diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 07:44:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 09:40:50 +0300 |
commit | 48b1656a6cce6fd7606a671eea9d0d17b67d7445 (patch) | |
tree | d95ed94cf1d1934c01de44364db7d53ca2262ff3 /source/blender/editors/space_image/image_ops.c | |
parent | 6e4cb463c44ab57331cda7ded645b4faa573bbb3 (diff) |
Cleanup: shadowing (editors)
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index f860ad8aa04..9a4a3b24e24 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1220,7 +1220,7 @@ static int image_open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( const char *path = U.textudir; Image *ima = NULL; Scene *scene = CTX_data_scene(C); - PropertyRNA *prop; + if (sima) { ima = sima->image; } @@ -1260,6 +1260,7 @@ static int image_open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( image_open_init(C, op); /* show multiview save options only if scene has multiviews */ + PropertyRNA *prop; prop = RNA_struct_find_property(op->ptr, "show_multiview"); RNA_property_boolean_set(op->ptr, prop, (scene->r.scemode & R_MULTIVIEW) != 0); @@ -2300,10 +2301,11 @@ static int image_new_exec(bContext *C, wmOperator *op) SpaceLink *sl; for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { - SpaceImage *sima = (SpaceImage *)sl; + SpaceImage *sima_other = (SpaceImage *)sl; - if (!sima->pin) - ED_space_image_set(sima, scene, scene->obedit, ima); + if (!sima_other->pin) { + ED_space_image_set(sima_other, scene, scene->obedit, ima); + } } } } |