From 3775cd7fc7d15aa03131a1d5cdccf57f185e2b92 Mon Sep 17 00:00:00 2001 From: Luis Medinas Date: Fri, 22 Oct 2010 11:30:58 +0000 Subject: Fix crash for Bug 632576 - Brasero segfaults just before it should start burning --- 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; } -- cgit v0.8.3.1