[Bf-blender-cvs] [2476fae] master: Fix crash in space context cycling when leaving window bounds
Julian Eisel
noreply at git.blender.org
Wed Sep 21 14:54:40 CEST 2016
Commit: 2476faebd751fe7a250d7a496a1f56338b83d4e9
Author: Julian Eisel
Date: Wed Sep 21 14:47:40 2016 +0200
Branches: master
https://developer.blender.org/rB2476faebd751fe7a250d7a496a1f56338b83d4e9
Fix crash in space context cycling when leaving window bounds
===================================================================
M source/blender/editors/screen/screen_ops.c
===================================================================
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 7612dbc..a6b6ccd 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4191,7 +4191,8 @@ static EnumPropertyItem space_context_cycle_direction[] = {
static int space_context_cycle_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
- return ELEM(sa->spacetype, SPACE_BUTS, SPACE_USERPREF);
+ /* sa might be NULL if called out of window bounds */
+ return (sa && ELEM(sa->spacetype, SPACE_BUTS, SPACE_USERPREF));
}
/**
More information about the Bf-blender-cvs
mailing list