diff --git a/konversation/PKGBUILD b/konversation/PKGBUILD index b3d9fcc01..0c3c9bc4b 100644 --- a/konversation/PKGBUILD +++ b/konversation/PKGBUILD @@ -3,7 +3,7 @@ source ../kdeapps.conf pkgname=konversation pkgver=1.6 -pkgrel=2 +pkgrel=3 pkgdesc="A user friendly IRC client for KDE" arch=('x86_64') url="http://konversation.kde.org" @@ -13,11 +13,15 @@ license=('GPL2' 'FDL') categories=('communication') screenshots=('http://konversation.kde.org/screenshots/konversation13_2.png') install=${pkgname}.install -source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz") -sha1sums=('16e8c1969b04c0946b48a436e8825654b0029bb9') +source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz" + avoid-dcc-crashes.patch) +sha1sums=('16e8c1969b04c0946b48a436e8825654b0029bb9' + '357fe9815f3ac35bde5718fc6f556ba037e0b72c') prepare(){ mkdir -p build + cd ${srcdir}/${pkgname}-${pkgver} + patch -p1 -i ../../avoid-dcc-crashes.patch } build() { @@ -30,3 +34,4 @@ package() { cd build make DESTDIR=${pkgdir} install } + diff --git a/konversation/avoid-dcc-crashes.patch b/konversation/avoid-dcc-crashes.patch new file mode 100644 index 000000000..0bc7ddb38 --- /dev/null +++ b/konversation/avoid-dcc-crashes.patch @@ -0,0 +1,57 @@ +From 459d1f949caee1e15ee8d3f1b55dccedf923b1cc Mon Sep 17 00:00:00 2001 +From: shainer +Date: Thu, 5 May 2016 00:36:10 +0100 +Subject: [PATCH] canMoveView{Left,Right} returns a safe default in case of + invalid views. + +--- + src/viewer/viewcontainer.cpp | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/viewer/viewcontainer.cpp b/src/viewer/viewcontainer.cpp +index aafa5cc..a2308bc 100644 +--- a/src/viewer/viewcontainer.cpp ++++ b/src/viewer/viewcontainer.cpp +@@ -54,7 +54,6 @@ + #include + #include + +- + using namespace Konversation; + + ViewMimeData::ViewMimeData(ChatWindow *view) : QMimeData() +@@ -1818,6 +1817,11 @@ bool ViewContainer::canMoveViewLeft() const + + ChatWindow* view = static_cast(m_tabWidget->widget(index)); + ++ // Safeguard in case we get returned an invalid object for some reason ++ if (view == nullptr) { ++ return false; ++ } ++ + if (view->isTopLevelView() && index > 0) { + return true; + } else if (!view->isTopLevelView()) { +@@ -1842,6 +1846,11 @@ bool ViewContainer::canMoveViewRight() const + + ChatWindow* view = static_cast(m_tabWidget->widget(index)); + ++ // Safeguard in case we get returned an invalid object for some reason ++ if (view == nullptr) { ++ return false; ++ } ++ + if (view->isTopLevelView()) { + int lastTopLevelView = -1; + +@@ -2630,6 +2639,7 @@ void ViewContainer::closeDccPanel() + { + // hide it from view, does not delete it + if (m_tabWidget) m_tabWidget->removeTab(m_tabWidget->indexOf(m_dccPanel)); ++ + m_dccPanelOpen=false; + (dynamic_cast(actionCollection()->action("open_dccstatus_window")))->setChecked(false); + } +-- +2.7.4 +