summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-06-30 10:59:28 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-06-30 10:59:28 -0400
commitdce25efef43f08ae28842f5eba5c807e54352ac1 (patch)
tree8f86728e25191318e475f8848f7ecef19ebfe4ac /src
parent59a09e04aa88e4f9e6fd857c3159dfac99336933 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_cnp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 7bb2190..a7f81ee 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -2697,9 +2697,9 @@ _wl_data_preparer_uri(Wl_Cnp_Selection *sel, Elm_Selection_Data *ddata, Ecore_Wl
2697 cnp_debug("In\n"); 2697 cnp_debug("In\n");
2698 2698
2699 drop = eo_key_data_get(sel->requestwidget, "__elm_dropable"); 2699 drop = eo_key_data_get(sel->requestwidget, "__elm_dropable");
2700 if (drop) 2700 if (drop) type = drop->last.type;
2701 type = drop->last.type; 2701
2702 if (!strcmp(type, "text/uri-list")) 2702 if ((type) && (!strcmp(type, "text/uri-list")))
2703 { 2703 {
2704 int num_files = 0; 2704 int num_files = 0;
2705 char **files = NULL; 2705 char **files = NULL;