diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index e14b3036743..f7d51eb403f 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -571,8 +571,8 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op) ToolSettings *toolsettings = CTX_data_tool_settings(C); if (!is_mode_set) { - Scene *scene = CTX_data_scene(C); - if (!ED_object_mode_compat_set(C, scene->basact->object, mode_flag, op->reports)) { + Object *ob = CTX_data_active_object(C); + if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) { return OPERATOR_CANCELLED; } } |