]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) #5204 "Transmission GTK client crashes on start" -- another possible...
authorJordan Lee <jordan@transmissionbt.com>
Tue, 11 Oct 2011 20:32:15 +0000 (20:32 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Tue, 11 Oct 2011 20:32:15 +0000 (20:32 +0000)
gtk/tr-core.c

index 8fc62093abca0d322b7155de9f7380c9cbac3b5c..3319c2f93669721561a9ee9f225465c328a03bc0 100644 (file)
@@ -1415,8 +1415,11 @@ gtr_inhibit_hibernation( guint * cookie )
     }
 
     /* cleanup */
-    g_variant_unref( response );
-    g_object_unref( connection );
+    if( response != NULL )
+        g_variant_unref( response );
+    if( connection != NULL )
+        g_object_unref( connection );
+
     return success;
 }