From dfe7117ba619ae51bde0d79f96c7472fc5d1336b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sat, 1 Dec 2012 16:08:39 +0000 Subject: [PATCH] force enable gc edit flag if gcc is being edited to prevent crash when deleting just-added gadman gadgets from dialog SVN revision: 79972 --- src/modules/gadman/e_mod_gadman.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/gadman/e_mod_gadman.c b/src/modules/gadman/e_mod_gadman.c index ce63a5ba4..60f3cc790 100644 --- a/src/modules/gadman/e_mod_gadman.c +++ b/src/modules/gadman/e_mod_gadman.c @@ -231,7 +231,9 @@ _gadman_gadget_free(void *data __UNUSED__, void *obj) gcc->cf = NULL; } edit = (gcc == gcc->gadcon->drag_gcc) || (Man->drag_gcc[gcc->gadcon->id - ID_GADMAN_LAYER_BASE] == gcc); - if (edit) gadman_gadget_edit_end(NULL, NULL, NULL, NULL); + if (!edit) return; + gcc->gadcon->editing = 1; // may get unset from a dialog, force here to prevent crash + gadman_gadget_edit_end(NULL, NULL, NULL, NULL); } static E_Gadcon_Client *