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>2017-10-18 11:46:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-18 11:46:39 +0300
commitecf20e7a5629f194abe77d9b82c8dc73f06a160f (patch)
tree579007a7f1e93837810b234194dc1ed5cbbab6dc /source/blender/windowmanager
parentec2bbc90e7c6a7f21da253333a14d49ef1428319 (diff)
Fix crash accessing enums without a context
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 2ad90537cde..fef65d3dfc2 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -59,9 +59,9 @@
#include "BKE_screen.h"
#include "BKE_workspace.h"
-
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -883,6 +883,9 @@ int wm_window_new_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(even
const EnumPropertyItem *wm_window_new_screen_itemf(
bContext *C, struct PointerRNA *UNUSED(ptr), struct PropertyRNA *UNUSED(prop), bool *r_free)
{
+ if (C == NULL) {
+ return DummyRNA_NULL_items;
+ }
wmWindow *win = CTX_wm_window(C);
WorkSpace *workspace = WM_window_get_active_workspace(win);
ListBase *listbase = BKE_workspace_layouts_get(workspace);