elm_cnp.c: Did a subtle code cleanup.

savedtypes.imgfile should not be null logically or this function should have been returned in advance.
This commit is contained in:
Daniel Juyung Seo 2013-10-08 00:08:19 +09:00
parent e9f6a91ff8
commit 1eb4b8d9e1
1 changed files with 2 additions and 2 deletions

View File

@ -2775,7 +2775,7 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data)
sdata.data = entrytag;
drop->dropcb(drop->cbdata, drop->obj, &sdata);
ecore_wl_dnd_drag_end(ecore_wl_input_get());
if (savedtypes.imgfile) free(savedtypes.imgfile);
free(savedtypes.imgfile);
savedtypes.imgfile = NULL;
}
else if (drop->types & ELM_SEL_FORMAT_IMAGE)
@ -2784,7 +2784,7 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data)
sdata.data = (char *)savedtypes.imgfile;
drop->dropcb(drop->cbdata, drop->obj, &sdata);
ecore_wl_dnd_drag_end(ecore_wl_input_get());
if (savedtypes.imgfile) free(savedtypes.imgfile);
free(savedtypes.imgfile);
savedtypes.imgfile = NULL;
}
}