[SCM] qjackctl/master: Fix segfault when pressing stop button (Closes: #624198)

adiknoth-guest at users.alioth.debian.org adiknoth-guest at users.alioth.debian.org
Thu Apr 28 12:34:31 UTC 2011


The following commit has been merged in the master branch:
commit 966b76e895d0a46f37a0c2608208d79fe154c171
Author: Adrian Knoth <adi at drcomp.erfurt.thur.de>
Date:   Thu Apr 28 13:33:28 2011 +0200

    Fix segfault when pressing stop button (Closes: #624198)

diff --git a/debian/patches/shutdown.patch b/debian/patches/shutdown.patch
new file mode 100644
index 0000000..21da141
--- /dev/null
+++ b/debian/patches/shutdown.patch
@@ -0,0 +1,25 @@
+From: Adrian Knoth <adi at drcomp.erfurt.thur.de>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624198
+Forwarded: yes
+Applied-Upstream: 0.3.8, svn r685
+Description: Prevent segfault upon "stop"
+ If system ports were connected directly, pressing "stop" would cause a
+ segmentation fault. This patch fixes the issue.
+diff --git a/src/qjackctlConnect.cpp b/src/qjackctlConnect.cpp
+index 1604f5a..ce0e3c2 100644
+--- a/src/qjackctlConnect.cpp
++++ b/src/qjackctlConnect.cpp
+@@ -363,7 +364,12 @@ void qjackctlClientItem::setHilite ( bool bHilite )
+ 		m_iHilite--;
+ 
+ 	// Set the new color.
+-	const QPalette& pal = QTreeWidgetItem::treeWidget()->palette();
++    QTreeWidget *widget = QTreeWidgetItem::treeWidget();
++    if (NULL == widget) {
++        return;
++    }
++
++	const QPalette& pal = widget->palette();
+ 	QTreeWidgetItem::setTextColor(0, m_iHilite > 0
+ 		? (pal.base().color().value() < 0x7f ? Qt::darkCyan : Qt::darkBlue)
+ 		: pal.text().color());

-- 
qjackctl packaging



More information about the pkg-multimedia-commits mailing list