Clean up resource correctly if it fails to get Evas.
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 13 Oct 2014 11:22:52 +0000 (20:22 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 13 Oct 2014 11:22:52 +0000 (20:22 +0900)
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I74ee4cef1f57fbe0073cfc183ed7059d052badde

src/virtual_window.c

index 10235f2..4f482ff 100644 (file)
@@ -711,6 +711,9 @@ PUBLIC void *dynamicbox_get_evas_object(const char *id, int is_gbar)
                return NULL;
        }
 
+       ecore_evas_data_set(info->ee, "dynamic,box,info", info);
+       ecore_evas_callback_pre_free_set(info->ee, ecore_evas_free_cb);
+
        info->e = ecore_evas_get(info->ee);
        if (!info->e) {
                ErrPrint("Failed to get evas\n");
@@ -718,8 +721,6 @@ PUBLIC void *dynamicbox_get_evas_object(const char *id, int is_gbar)
                return NULL;
        }
 
-       ecore_evas_data_set(info->ee, "dynamic,box,info", info);
-
        pre_render_cb(info, NULL, NULL);
        ecore_evas_alpha_set(info->ee, EINA_TRUE);
        post_render_cb(info, NULL, NULL);
@@ -727,7 +728,6 @@ PUBLIC void *dynamicbox_get_evas_object(const char *id, int is_gbar)
        ecore_evas_manual_render_set(info->ee, EINA_FALSE);
        ecore_evas_resize(info->ee, 1, 1);
 
-       ecore_evas_callback_pre_free_set(info->ee, ecore_evas_free_cb);
        evas_event_callback_add(info->e, EVAS_CALLBACK_RENDER_POST, post_render_cb, info);
        evas_event_callback_add(info->e, EVAS_CALLBACK_RENDER_PRE, pre_render_cb, info);