From e763cc453fe53639f02ca858f965fb01ae2c9278 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Sat, 7 Jun 2008 18:31:08 +0000 Subject: [PATCH] If the desktop editor dialog is closed, close any open icon selector dialog. This fixes a nasty segfault if you closed the editor dialog while the icon selector dialog was open. SVN revision: 34771 --- src/bin/e_eap_editor.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bin/e_eap_editor.c b/src/bin/e_eap_editor.c index c5f3909d6..b12b7cedc 100644 --- a/src/bin/e_eap_editor.c +++ b/src/bin/e_eap_editor.c @@ -313,9 +313,9 @@ _e_desktop_edit_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) if (cfdata->desktop) efreet_desktop_free(cfdata->desktop); if (cfdata->editor->tmp_image_path) { - if (!cfdata->desktop || !cfdata->editor->saved || - !cfdata->desktop->icon || - strcmp(cfdata->editor->tmp_image_path, cfdata->desktop->icon)) + if ((!cfdata->desktop) || (!cfdata->editor->saved) || + (!cfdata->desktop->icon) || + (strcmp(cfdata->editor->tmp_image_path, cfdata->desktop->icon))) { ecore_file_unlink(cfdata->editor->tmp_image_path); } @@ -331,6 +331,9 @@ _e_desktop_edit_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) IFFREE(cfdata->icon); IFFREE(cfdata->mimes); + if (cfdata->editor->icon_fsel_dia) + e_object_del(E_OBJECT(cfdata->editor->icon_fsel_dia)); + e_object_del(E_OBJECT(cfdata->editor)); free(cfdata); }