[gnome-control-center] background: Don't access the panel object in _finish()



commit 39d7842ebe95623455add48aee033eb999ff2c8b
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 15 08:25:59 2013 +0100

    background: Don't access the panel object in _finish()
    
    We shouldn't access the panel object as we don't know whether
    the memory is still valid or the panel has gone away and was
    freed.

 panels/background/cc-background-panel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 178e34b..164c3cd 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -252,7 +252,7 @@ on_screenshot_finished (GObject *source,
   int height;
 
   error = NULL;
-  g_dbus_connection_call_finish (panel->priv->connection,
+  g_dbus_connection_call_finish (G_DBUS_CONNECTION (source),
                                  res,
                                  &error);
 



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