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:
authorJulian Eisel <eiseljulian@gmail.com>2016-09-21 15:47:40 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-09-21 15:53:42 +0300
commit2476faebd751fe7a250d7a496a1f56338b83d4e9 (patch)
tree28115ab40fe04edd01f943502aef6990cc1fb5f0 /source/blender/editors/screen/screen_ops.c
parentbb6af17799d9a7807e48d880fd49af52896d3502 (diff)
Fix crash in space context cycling when leaving window bounds
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r--source/blender/editors/screen/screen_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 7612dbc7f10..a6b6ccd5a66 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));
}
/**