Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-02 05:44:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-02 05:44:37 +0300
commitddea2f234f0a5f00ffcc35bb6ee1a1ace6c26d8e (patch)
treededd20f3d1a44fa509706425ef945870cf4b5b65 /source/blender/editors/space_image/space_image.c
parent957346694d49736408abea13cf9b33fa531b1ea2 (diff)
Fix crash accessing image space properties without an active window
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r--source/blender/editors/space_image/space_image.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index a806e3e25d1..aa3f6446d51 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -368,10 +368,9 @@ static void image_listener(wmWindow *win, ScrArea *area, wmNotifier *wmn, Scene
}
break;
case NC_MASK: {
- // Scene *scene = wmn->window->screen->scene;
- /* ideally would check for: ED_space_image_check_show_maskedit(scene, sima)
- * but we cant get the scene */
- if (sima->mode == SI_MODE_MASK) {
+ ViewLayer *view_layer = WM_window_get_active_view_layer(win);
+ Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
+ if (ED_space_image_check_show_maskedit(sima, obedit)) {
switch (wmn->data) {
case ND_SELECT:
ED_area_tag_redraw(area);