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

index 2c7d04599c994829cbe60fd498d1ecc07bcd88bc..8fc62093abca0d322b7155de9f7380c9cbac3b5c 100644 (file)
@@ -1401,9 +1401,10 @@ gtr_inhibit_hibernation( guint * cookie )
                                             NULL, G_DBUS_CALL_FLAGS_NONE,
                                             1000, NULL, &err );
 
-    *cookie = g_variant_get_uint32( g_variant_get_child_value( response, 0 ) );
+    if( response != NULL )
+        *cookie = g_variant_get_uint32( g_variant_get_child_value( response, 0 ) );
 
-    success = err == NULL;
+    success = ( response != NULL ) && ( err == NULL );
 
     /* logging */
     if( success )