add null checking code 95/152795/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 27 Sep 2017 06:27:01 +0000 (15:27 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 27 Sep 2017 06:27:01 +0000 (15:27 +0900)
Change-Id: Ib1b95ad483144223c7b5f6d5b48b8e88d5c6b63c

src/lib/compositor.c

index 8d6e5c309625047513ec84d8c1b9aed17d3aa9b8..c153d7ebe287ca2db36753799158102986300861 100644 (file)
@@ -58,18 +58,20 @@ _pepper_efl_compositor_get_socket_fd_from_server(pepper_efl_comp_t *comp)
 {
    Eina_Inlist *l, *tmp;
    Ecore_Wl_Global *global;
+   struct wl_registry *registry = NULL;
    struct tizen_embedded_compositor *tec=NULL;
    int fd = -1;
 
    l = ecore_wl_globals_get();
-   if (!l)
+   registry = ecore_wl_registry_get();
+   if (!l || !registry)
       return -1;
 
    EINA_INLIST_FOREACH_SAFE(l, tmp, global)
      {
         if (!strcmp(global->interface, "tizen_embedded_compositor"))
           {
-             tec = wl_registry_bind(ecore_wl_registry_get(),
+             tec = wl_registry_bind(registry,
                          global->id,
                          &tizen_embedded_compositor_interface,
                          1);