diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-19 07:06:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-19 07:07:32 +0300 |
commit | 3afe218a7d71ce4bb5d9b661bc966e8c99541184 (patch) | |
tree | 4834aea5f3a08fac6aba2debbf491992ccfa414e /source/blender/editors/space_image | |
parent | 9f8dd4f9e5c0a397485262ec815a88de4fa6cee4 (diff) |
Cleanup: assign Main, use existing assignments
Avoid accessing inline since it's often used multiple times.
In some cases it was already defined.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 5793ef4f3ec..6dc4a7f950c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -3199,6 +3199,7 @@ void IMAGE_OT_pack(wmOperatorType *ot) static int image_unpack_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Image *ima = image_from_context(C); int method = RNA_enum_get(op->ptr, "method"); @@ -3206,7 +3207,7 @@ static int image_unpack_exec(bContext *C, wmOperator *op) if (RNA_struct_property_is_set(op->ptr, "id")) { char imaname[MAX_ID_NAME - 2]; RNA_string_get(op->ptr, "id", imaname); - ima = BLI_findstring(&CTX_data_main(C)->images, imaname, offsetof(ID, name) + 2); + ima = BLI_findstring(&bmain->images, imaname, offsetof(ID, name) + 2); if (!ima) { ima = image_from_context(C); } |