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:
authorSybren A. Stüvel <sybren@blender.org>2019-12-17 17:55:48 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-12-17 17:55:48 +0300
commitaa7c1cdb7f165c564622ee3231dc75f34d80dd16 (patch)
tree0ec8c6f49e44806587f3f3af186cf5eb5cf1c4a2 /source/blender/editors/screen/screen_edit.c
parent7830ea29c2ea6c30cec1dcd6d6c11a1f228e9cd7 (diff)
UI: Prevent crash when opening file browser with mouse not in window
When the mouse is not inside the Blender window, `CTX_wm_area(C)` returns `NULL`, but this wasn't checked for.
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r--source/blender/editors/screen/screen_edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 5b8fd33a4e9..501c36286d0 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1389,13 +1389,13 @@ ScrArea *ED_screen_temp_space_open(bContext *C,
case USER_TEMP_SPACE_DISPLAY_FULLSCREEN: {
ScrArea *ctx_sa = CTX_wm_area(C);
- if (ctx_sa->full) {
+ if (ctx_sa != NULL && ctx_sa->full) {
sa = ctx_sa;
ED_area_newspace(C, ctx_sa, space_type, true);
sa->flag |= AREA_FLAG_STACKED_FULLSCREEN;
((SpaceLink *)sa->spacedata.first)->link_flag |= SPACE_FLAG_TYPE_TEMPORARY;
}
- else if (ctx_sa->spacetype == space_type) {
+ else if (ctx_sa != NULL && ctx_sa->spacetype == space_type) {
sa = ED_screen_state_toggle(C, CTX_wm_window(C), ctx_sa, SCREENMAXIMIZED);
}
else {