[gdl] Fix crash when moving widgets
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdl] Fix crash when moving widgets
- Date: Fri, 21 Jun 2013 20:15:54 +0000 (UTC)
commit 745d2742c98e3585f3ca99b455c83af6ddb2fc54
Author: Sébastien Granjoux <seb sfo free fr>
Date: Mon Jun 17 21:45:54 2013 +0200
Fix crash when moving widgets
gdl/gdl-dock-object.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdl/gdl-dock-object.c b/gdl/gdl-dock-object.c
index 5db1e6d..3ced214 100644
--- a/gdl/gdl-dock-object.c
+++ b/gdl/gdl-dock-object.c
@@ -875,6 +875,7 @@ gdl_dock_object_dock (GdlDockObject *object,
/* detach the requestor before docking */
g_object_ref (requestor);
parent = gdl_dock_object_get_parent_object (requestor);
+ if (parent) g_object_ref (parent);
gdl_dock_object_detach (requestor, FALSE);
if (position != GDL_DOCK_NONE)
@@ -891,7 +892,11 @@ gdl_dock_object_dock (GdlDockObject *object,
#endif
}
/* Update visibility of automatic parents */
- if (parent != NULL) gdl_dock_object_update_visibility (parent);
+ if (parent != NULL)
+ {
+ gdl_dock_object_update_visibility (parent);
+ g_object_unref (parent);
+ }
gdl_dock_object_update_parent_visibility (GDL_DOCK_OBJECT (requestor));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]