diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 70716de6bdc..7cce7a0bbed 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -748,12 +748,14 @@ void ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str) { uiSearchboxData *data= ar->regiondata; - data->items.autocpl= autocomplete_begin(str, ui_get_but_string_max_length(but)); + if(str[0]) { + data->items.autocpl= autocomplete_begin(str, ui_get_but_string_max_length(but)); - but->search_func(C, but->search_arg, but->editstr, &data->items); + but->search_func(C, but->search_arg, but->editstr, &data->items); - autocomplete_end(data->items.autocpl, str); - data->items.autocpl= NULL; + autocomplete_end(data->items.autocpl, str); + data->items.autocpl= NULL; + } } static void ui_searchbox_region_draw(const bContext *C, ARegion *ar) diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 7fc3753eefb..20fd33fc731 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -723,7 +723,7 @@ void MESH_OT_knife_cut(wmOperatorType *ot) ot->modal= WM_gesture_lines_modal; ot->exec= knife_cut_exec; - ot->poll= ED_operator_editmesh; + ot->poll= EM_view3d_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 65a46d6514d..a217dbe9f57 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -933,7 +933,7 @@ int file_delete_poll(bContext *C) SpaceFile *sfile= CTX_wm_space_file(C); struct direntry* file; - if (sfile->params) { + if (sfile && sfile->params) { if (sfile->params->active_file < 0) { poll= 0; } else {