[gnome-menus] libmenu: Dispose of source before context to avoid possible double unref
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-menus] libmenu: Dispose of source before context to avoid possible double unref
- Date: Mon, 1 Aug 2011 17:45:02 +0000 (UTC)
commit fc5492ab992fde2b8d378ed91f0b4c6c62cbe69b
Author: Colin Walters <walters verbum org>
Date: Tue Jun 14 13:52:06 2011 -0400
libmenu: Dispose of source before context to avoid possible double unref
libmenu/menu-layout.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libmenu/menu-layout.c b/libmenu/menu-layout.c
index 2c88518..4b2a02c 100644
--- a/libmenu/menu-layout.c
+++ b/libmenu/menu-layout.c
@@ -247,14 +247,14 @@ menu_layout_node_unref (MenuLayoutNode *node)
g_slist_foreach (nr->monitors, (GFunc) g_free, NULL);
g_slist_free (nr->monitors);
- if (nr->main_context != NULL)
- g_main_context_unref (nr->main_context);
- nr->main_context = NULL;
-
if (nr->monitors_idle_handler != NULL)
g_source_destroy (nr->monitors_idle_handler);
nr->monitors_idle_handler = NULL;
+ if (nr->main_context != NULL)
+ g_main_context_unref (nr->main_context);
+ nr->main_context = NULL;
+
g_free (nr->basedir);
g_free (nr->name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]