From 40d5f91804bbb352a1f2571ab304c6368d6a7d6d Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Sat, 8 Apr 2006 21:56:03 +0000 Subject: [PATCH] Fix segfault when deleting a background while this dialog is open. Add file monitor event for deleting a background while config dialog is open to remove it from the list. SVN revision: 21960 --- src/bin/e_int_config_background.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/e_int_config_background.c b/src/bin/e_int_config_background.c index 266e0bc9c..3b1da5d70 100644 --- a/src/bin/e_int_config_background.c +++ b/src/bin/e_int_config_background.c @@ -466,6 +466,7 @@ _bg_file_added(void *data, Ecore_File_Monitor *monitor, Ecore_File_Event event, Evas *evas; Evas_Object *il, *ic; char *file; + char *noext; cfdata = data; if (!cfdata) return; @@ -490,7 +491,11 @@ _bg_file_added(void *data, Ecore_File_Monitor *monitor, Ecore_File_Event event, e_widget_ilist_append(il, ic, ecore_file_strip_ext(file), _ilist_cb_bg_selected, cfd, (char *)path); } } - free(file); + else if (event == ECORE_FILE_EVENT_DELETED_FILE) + { + noext = ecore_file_strip_ext(file); + e_widget_ilist_remove_label(il, noext); + } } static int