Edi_editor.c: Fix segfault
Fix a segfault when opening a file in a new window and then pressing a key without any other interaction. Simply check if item is null and return without action if it is.
This commit is contained in:
parent
68679607e6
commit
22cfc584d6
|
@ -172,6 +172,10 @@ _smart_cb_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
|
|||
shift = evas_key_modifier_is_set(ev->modifiers, "Shift");
|
||||
|
||||
item = edi_mainview_item_current_get();
|
||||
|
||||
if (!item)
|
||||
return;
|
||||
|
||||
content = elm_object_item_content_get(item->view);
|
||||
editor = (Edi_Editor *)evas_object_data_get(content, "editor");
|
||||
|
||||
|
|
Loading…
Reference in New Issue