[gdl] Fix bgo #680655 - test-dock crashes
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdl] Fix bgo #680655 - test-dock crashes
- Date: Sun, 29 Jul 2012 15:37:48 +0000 (UTC)
commit abc3147e48544a90a60f6e2e40ad7f8cf99ccef4
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sun Jul 29 17:32:49 2012 +0200
Fix bgo #680655 - test-dock crashes
gdl/gdl-dock.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdl/gdl-dock.c b/gdl/gdl-dock.c
index 57b6c7d..9a8e14b 100644
--- a/gdl/gdl-dock.c
+++ b/gdl/gdl-dock.c
@@ -1306,9 +1306,11 @@ gdl_dock_add_item (GdlDock *dock,
g_return_if_fail (dock != NULL);
g_return_if_fail (item != NULL);
- /* Check if a placeholder widget already exist */
+ /* Check if a placeholder widget already exist in the same dock */
placeholder = gdl_dock_master_get_object (GDL_DOCK_OBJECT_GET_MASTER (dock), GDL_DOCK_OBJECT (item)->name);
- if ((placeholder != NULL))
+ if ((placeholder != NULL) &&
+ gdl_dock_item_is_closed (placeholder) &&
+ (gdl_dock_object_get_toplevel (placeholder) == dock))
parent = gdl_dock_object_get_parent_object (placeholder);
if (parent && gdl_dock_object_child_placement (parent, placeholder, &place))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]