Add an exception handling 91/147891/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 6 Sep 2017 03:21:00 +0000 (12:21 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 6 Sep 2017 03:21:00 +0000 (12:21 +0900)
- Checks whether the pointer is null or NOT.

Change-Id: I8fc29b68f0a18577cedf7e0839e7182f977a4e71
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/multiwindow_base/appcore_multiwindow_base_window.c

index 39b4efa..06c7784 100644 (file)
@@ -150,6 +150,11 @@ EXPORT_API void appcore_multiwindow_base_window_bind(appcore_multiwindow_base_in
        id = ecore_wl_window_id_get(wl_win);
 
        cxt = malloc(sizeof(win_context));
+       if (cxt == NULL) {
+               _ERR("Out of memory");
+               return;
+       }
+
        cxt->win_id = id;
        cxt->inst = h;
        __win_contexts = g_list_append(__win_contexts, cxt);