edje: Fix dereference null return value

Summary: Fix Coverity CID1287154. _alloc function can return null
however 'color' was never checked after call to _alloc and thus Could
be NULL.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-04-12 20:58:59 -04:00
parent 3eed18d231
commit 62b8c967b4
1 changed files with 3 additions and 1 deletions

View File

@ -6782,7 +6782,9 @@ edje_edit_state_map_point_color_set(Evas_Object *obj, const char *part, const ch
if (!color)
{
color = _alloc(sizeof(Edje_Map_Color));
if (!(color = _alloc(sizeof(Edje_Map_Color))))
return EINA_FALSE;
pd->map.colors_count++;
pd->map.colors =
realloc(pd->map.colors,