edje_cc: Fix dereference null return value

Summary: Fix Coverity CID1308232 which reports that we may be passing
NULL to strcmp here as the function _parse_param_get May return NULL.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-06-25 14:55:44 -04:00
parent cbc726ac56
commit 6949d1193e
1 changed files with 5 additions and 1 deletions

View File

@ -1843,10 +1843,14 @@ int
get_param_index(char *str) get_param_index(char *str)
{ {
int index; int index;
char *p;
for(index = 0; index < get_arg_count(); index++) for(index = 0; index < get_arg_count(); index++)
{ {
if(!strcmp(str,_parse_param_get(index))) p = _parse_param_get(index);
if (!p) continue;
if (!strcmp(str, p))
return index; return index;
} }