[gimp/soc-2011-seamless-clone2] app: allow to call gimp_image_map_tool_dialog_hide() multiple times
- From: Clayton Walker <claytonw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-seamless-clone2] app: allow to call gimp_image_map_tool_dialog_hide() multiple times
- Date: Wed, 8 May 2013 15:20:06 +0000 (UTC)
commit 52e93b67791165034c03cfdc21789d9c40fce590
Author: Michael Natterer <mitch gimp org>
Date: Thu Apr 25 22:23:32 2013 +0200
app: allow to call gimp_image_map_tool_dialog_hide() multiple times
don't try to remove a GimpOverlayDialog from the canvas twice.
app/tools/gimpimagemaptool.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c
index 51690f9..be0af1b 100644
--- a/app/tools/gimpimagemaptool.c
+++ b/app/tools/gimpimagemaptool.c
@@ -733,9 +733,12 @@ gimp_image_map_tool_dialog_hide (GimpImageMapTool *image_map_tool)
}
else if (GIMP_IS_OVERLAY_DIALOG (dialog))
{
- g_object_ref (dialog);
- gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (dialog)),
- dialog);
+ if (gtk_widget_get_parent (dialog))
+ {
+ g_object_ref (dialog);
+ gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (dialog)),
+ dialog);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]