diff options
-rw-r--r-- | src/app_resource.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/app_resource.c b/src/app_resource.c index 374472b..ff36edc 100644 --- a/src/app_resource.c +++ b/src/app_resource.c @@ -30,20 +30,41 @@ 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; } |