elementary: Fix explicit null dereference

This patch fixes an issue reported by coverity where 'type' variable
could be null and passing null to strcmp is not good ;)

Fixes Coverity CID1357147

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-06-30 10:59:28 -04:00
parent 59a09e04aa
commit dce25efef4
1 changed files with 3 additions and 3 deletions

View File

@ -2697,9 +2697,9 @@ _wl_data_preparer_uri(Wl_Cnp_Selection *sel, Elm_Selection_Data *ddata, Ecore_Wl
cnp_debug("In\n");
drop = eo_key_data_get(sel->requestwidget, "__elm_dropable");
if (drop)
type = drop->last.type;
if (!strcmp(type, "text/uri-list"))
if (drop) type = drop->last.type;
if ((type) && (!strcmp(type, "text/uri-list")))
{
int num_files = 0;
char **files = NULL;