[brasero] Fix crash for Bug 632576 - Brasero segfaults just before it should start burning



commit 297db3573536c033fb6c9fa3a2827d66ca0c092c
Author: Luis Medinas <lmedinas gnome org>
Date:   Fri Oct 22 12:30:58 2010 +0100

    Fix crash for Bug 632576 - Brasero segfaults just before it should start
    burning

 libbrasero-burn/burn-dbus.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/libbrasero-burn/burn-dbus.c b/libbrasero-burn/burn-dbus.c
index 9292da3..fe5dea0 100644
--- a/libbrasero-burn/burn-dbus.c
+++ b/libbrasero-burn/burn-dbus.c
@@ -43,7 +43,7 @@
 
 static GDBusConnection *conn;
 
-void 
+void
 brasero_uninhibit_suspend (guint cookie)
 {
 	GError		*error = NULL;
@@ -80,9 +80,11 @@ brasero_uninhibit_suspend (guint cookie)
 		g_warning ("Failed to restore the system power manager: %s",
 			    error->message);
 		g_error_free (error);
-	}
+	} else {
+                g_variant_get (res, "(u)", &cookie);
+                g_variant_unref (res);
+        }
 
-	g_variant_unref (res);
 }
 
 gint
@@ -127,9 +129,8 @@ brasero_inhibit_suspend (const char *reason)
 	}
 	else {
 		g_variant_get (res, "(u)", &cookie);
+		g_variant_unref (res);
 	}
 
-	g_variant_unref (res);
-
 	return cookie;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]