From 8c323d1614daabff090fd4b891e5c26989c34ede Mon Sep 17 00:00:00 2001 From: YoungHun Cho Date: Mon, 7 Aug 2017 13:22:28 +0900 Subject: [PATCH] prevent null pointer Change-Id: Id929e411056c059c726585fc628cdc62047d9a42 --- src/list_util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/list_util.c b/src/list_util.c index 7883ece..27d6dd8 100755 --- a/src/list_util.c +++ b/src/list_util.c @@ -68,9 +68,10 @@ HAPI void quickpanel_list_util_set_item_type(Evas_Object *item, qp_item_type_e t if (item_type == NULL) { item_type = (int*)malloc(sizeof(int)); - *item_type = type; - - evas_object_data_set(item, E_DATA_ITEM_LABEL_H, (void*)item_type); + if (item_type) { + *item_type = type; + evas_object_data_set(item, E_DATA_ITEM_LABEL_H, (void*)item_type); + } } } -- 2.7.4