Don't deref a pointer before we check it.

SVN revision: 49473
This commit is contained in:
Brett Nash 2010-06-06 04:09:56 +00:00
parent 7746e8b514
commit 5e39da8d53
1 changed files with 3 additions and 1 deletions

View File

@ -455,8 +455,10 @@ static void
_store_selection(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
const char *sel = edje_object_part_text_selection_get(wd->ent, "elm.text");
const char *sel;
if (!wd) return;
sel = edje_object_part_text_selection_get(wd->ent, "elm.text");
eina_stringshare_replace(&wd->cut_sel, sel);
}