elm_list.c: check null as well.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Sun, 11 Aug 2013 08:11:03 +0000 (17:11 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Sun, 11 Aug 2013 08:11:03 +0000 (17:11 +0900)
This fixes coverity CID 1049944 Dereference after null check (FORWARD_NULL).

src/lib/elm_list.c

index 11d48a0a0da657b2ec9d7cef075ec6f2556a905f..aeb410cfaf08221f7bf8b5db9e9e726841d23739 100644 (file)
@@ -1349,7 +1349,7 @@ _item_content_set_hook(Elm_Object_Item *it,
 
    if (VIEW(item))
      {
-        if (!strcmp(part, "start"))
+        if ((!part) || !strcmp(part, "start"))
           edje_object_part_swallow(VIEW(item), "elm.swallow.icon", content);
         else
           edje_object_part_swallow(VIEW(item), "elm.swallow.end", content);