From 3afe218a7d71ce4bb5d9b661bc966e8c99541184 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Feb 2020 15:06:14 +1100 Subject: Cleanup: assign Main, use existing assignments Avoid accessing inline since it's often used multiple times. In some cases it was already defined. --- source/blender/editors/space_nla/nla_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index ac6ee125798..150a4ef127f 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -587,6 +587,7 @@ void NLA_OT_view_frame(wmOperatorType *ot) /* add the specified action as new strip */ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); bAnimContext ac; Scene *scene; @@ -608,7 +609,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) cfra = (float)CFRA; /* get action to use */ - act = BLI_findlink(&CTX_data_main(C)->actions, RNA_enum_get(op->ptr, "action")); + act = BLI_findlink(&bmain->actions, RNA_enum_get(op->ptr, "action")); if (act == NULL) { BKE_report(op->reports, RPT_ERROR, "No valid action to add"); -- cgit v1.2.3