diff options
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 5c9fd233a5c..14fd486c546 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -512,18 +512,21 @@ static void image_listener(bScreen *sc, ScrArea *sa, wmNotifier *wmn) } case NC_OBJECT: { - Object *ob = OBACT; switch (wmn->data) { case ND_TRANSFORM: case ND_MODIFIER: - if (ob == (Object *)wmn->reference && (ob->mode & OB_MODE_EDIT)) { + { + Object *ob = OBACT; + if (ob && (ob == wmn->reference) && (ob->mode & OB_MODE_EDIT)) { if (sima->lock && (sima->flag & SI_DRAWSHADOW)) { ED_area_tag_refresh(sa); ED_area_tag_redraw(sa); } } break; + } } + break; } } |