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
This commit is contained in:
Christopher Michael 2008-06-07 18:31:08 +00:00
parent 34eb4aeda4
commit e763cc453f
1 changed files with 6 additions and 3 deletions

View File

@ -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);
}