summaryrefslogtreecommitdiffstats
path: root/extra/polkit-qt/null-checking.patch
blob: 0ec2a8e380102d1769d20addeaa1e8b73a7069d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: agent/polkitqt1-agent-listener.cpp
===================================================================
--- agent/polkitqt1-agent-listener.cpp	(revision 1183495)
+++ agent/polkitqt1-agent-listener.cpp	(working copy)
@@ -66,7 +66,8 @@
     qDebug("Destroying listener");
 
     ListenerAdapter::instance()->removeListener(this);
-    g_object_unref(d->listener);
+    if (d->listener != NULL)
+        g_object_unref(d->listener);
 }
 
 bool Listener::registerListener(PolkitQt1::Subject *subject, const QString &objectPath)