diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref_keymap.py | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index 5658cc96281..9736ea5bc22 100644 --- a/release/scripts/startup/bl_ui/space_userpref_keymap.py +++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py @@ -545,9 +545,11 @@ class WM_OT_keyconfig_import(bpy.types.Operator): if not self.filepath: raise Exception("Filepath not set") + # simply check we can open f = open(self.filepath, "r") if not f: raise Exception("Could not open file") + f.close() config_name = basename(self.filepath) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 35125d1483e..305a4a8b3d6 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -277,7 +277,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) case UI_ID_ALONE: if(id) { const int do_scene_obj= (GS(id->name) == ID_OB) && - (template->ptr.type == &RNA_SceneObjects); + (template->ptr.type == &RNA_SceneObjects); /* make copy */ if(do_scene_obj) { |