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:
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r--source/blender/editors/screen/screen_ops.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 3618b933443..c069b3c6292 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -723,15 +723,16 @@ typedef struct sActionzoneData {
static bool actionzone_area_poll(bContext *C)
{
wmWindow *win = CTX_wm_window(C);
- bScreen *screen = WM_window_get_active_screen(win);
-
- if (screen && win && win->eventstate) {
- const int *xy = &win->eventstate->xy[0];
+ if (win && win->eventstate) {
+ bScreen *screen = WM_window_get_active_screen(win);
+ if (screen) {
+ const int *xy = &win->eventstate->xy[0];
- LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
- LISTBASE_FOREACH (AZone *, az, &area->actionzones) {
- if (BLI_rcti_isect_pt_v(&az->rect, xy)) {
- return true;
+ LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+ LISTBASE_FOREACH (AZone *, az, &area->actionzones) {
+ if (BLI_rcti_isect_pt_v(&az->rect, xy)) {
+ return true;
+ }
}
}
}