tpl_wayland_egl_thread: Added an exception checking. 07/165707/2
authorjoonbum.ko <joonbum.ko@samsung.com>
Wed, 3 Jan 2018 09:06:17 +0000 (18:06 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Wed, 3 Jan 2018 09:23:54 +0000 (18:23 +0900)
Change-Id: Id3562d0832f7ab5d911dd83d9b7571e349a62751
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
src/tpl_wayland_egl_thread.c

index 7274b2f..d865a69 100644 (file)
@@ -292,7 +292,7 @@ _twe_del_source_init(twe_thread_context *ctx, void *target_source)
        source = (twe_del_source *)g_source_new(&_twe_del_source_funcs,
                                                                                        sizeof(twe_del_source));
        if (!source) {
-               TPL_ERR("[THREAD] Failed to create GSource");
+               TPL_ERR("[THREAD] Failed to create twe_del_source.");
                return NULL;
        }
 
@@ -947,6 +947,11 @@ twe_display_add(twe_thread* thread,
 
        source = (twe_wl_disp_source *)g_source_new(&_twe_wl_disp_funcs,
                                                                                                sizeof(twe_wl_disp_source));
+       if (!source) {
+               TPL_ERR("Failed to create twe_wl_disp_source.");
+               return NULL;
+       }
+
        source->disp = display;
        source->ev_queue = ev_queue;
        source->wl_tbm_client = wl_tbm_client;
@@ -2261,7 +2266,6 @@ twe_surface_add(twe_thread* thread,
        twe_thread_context *ctx = thread->ctx;
        twe_wl_surf_source *source = NULL;
        twe_wl_disp_source *disp_source = (twe_wl_disp_source *)twe_display;
-       GIOChannel *event_channel = NULL;
        gboolean is_destroyed = FALSE;
        tbm_surface_queue_h tbm_queue = NULL;
 
@@ -2275,8 +2279,7 @@ twe_surface_add(twe_thread* thread,
        source = (twe_wl_surf_source *)g_source_new(&_twe_wl_surface_funcs,
                                                                                                sizeof(twe_wl_surf_source));
        if (!source) {
-               TPL_ERR("[THREAD] Failed to create GSource from event_channel(%p)",
-                               event_channel);
+               TPL_ERR("[THREAD] Failed to create twe_wl_surf_source");
                return NULL;
        }