Reset pre-initialized object to null pointer 80/101180/2 accepted/tizen/3.0/common/20161205.092039 accepted/tizen/3.0/ivi/20161205.000413 accepted/tizen/3.0/mobile/20161205.000309 accepted/tizen/3.0/tv/20161205.000342 accepted/tizen/3.0/wearable/20161205.000354 submit/tizen_3.0/20161202.062936 submit/tizen_3.0/20161202.134357
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 30 Nov 2016 10:43:46 +0000 (19:43 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 1 Dec 2016 23:27:07 +0000 (08:27 +0900)
Change-Id: I27d3ff1c875189d17fae7cc167daf0ef005abd84
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/app_resource.c

index 374472b..ff36edc 100644 (file)
 
 void *app_get_preinitialized_window(const char *win_name)
 {
-       if (elm_win_precreated_object_get() == NULL)
+       void *win;
+
+       win = elm_win_precreated_object_get();
+       if (win == NULL)
                return NULL;
 
        appcore_set_preinit_window_name(win_name);
-       return elm_win_precreated_object_get();
+       elm_win_precreated_object_set(NULL);
+
+       return win;
 }
 
 void *app_get_preinitialized_background(void)
 {
-       return elm_bg_precreated_object_get();
+       void *background;
+
+       background = elm_bg_precreated_object_get();
+       if (background == NULL)
+               return NULL;
+
+       elm_bg_precreated_object_set(NULL);
+
+       return background;
 }
 
 void *app_get_preinitialized_conformant(void)
 {
-       return elm_conformant_precreated_object_get();
+       void *conformant;
+
+       conformant = elm_conformant_precreated_object_get();
+       if (conformant == NULL)
+               return NULL;
+
+       elm_conformant_precreated_object_set(NULL);
+
+       return conformant;
 }