summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_ui_popup.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_ui_popup.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/bin/elementary/test_ui_popup.c b/src/bin/elementary/test_ui_popup.c
index 89a9f0e..cf80910 100644
--- a/src/bin/elementary/test_ui_popup.c
+++ b/src/bin/elementary/test_ui_popup.c
@@ -214,8 +214,12 @@ static void
214_win_del(void *data, const Efl_Event *ev EINA_UNUSED) 214_win_del(void *data, const Efl_Event *ev EINA_UNUSED)
215{ 215{
216 efl_ui_popup_data *p_data = data; 216 efl_ui_popup_data *p_data = data;
217 efl_unref(p_data->panel_win); 217 Eo *win = p_data->panel_win;
218 free(p_data); 218 p_data->panel_win = NULL;
219 /* only free pointer if the other window has already been freed */
220 if (!p_data->win)
221 free(p_data);
222 efl_unref(win);
219 printf("window is deleted\n"); 223 printf("window is deleted\n");
220} 224}
221 225
@@ -223,8 +227,12 @@ static void
223_panel_win_del(void *data, const Efl_Event *ev EINA_UNUSED) 227_panel_win_del(void *data, const Efl_Event *ev EINA_UNUSED)
224{ 228{
225 efl_ui_popup_data *p_data = data; 229 efl_ui_popup_data *p_data = data;
226 efl_unref(p_data->win); 230 Eo *win = p_data->win;
227 free(p_data); 231 p_data->win = NULL;
232 /* only free pointer if the other window has already been freed */
233 if (!p_data->win)
234 free(p_data);
235 efl_unref(win);
228 printf("window is deleted\n"); 236 printf("window is deleted\n");
229} 237}
230 238