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>2019-05-01 04:48:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-01 04:48:39 +0300
commit3ae872d9abb899fa1a3f581fe0064b6941758d50 (patch)
treeda6270339712fb5f7b48a8d06c7a59c52137c227 /source/blender/makesrna
parent909665a0d4ed23620afc537c583a6e84cdee50b9 (diff)
Fix T64049: Unset space type crashes
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 89996cf3241..3de946c1c8f 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -149,11 +149,16 @@ static void rna_Area_type_set(PointerRNA *ptr, int value)
static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
{
- wmWindowManager *wm = CTX_wm_manager(C);
- wmWindow *win;
bScreen *sc = (bScreen *)ptr->id.data;
ScrArea *sa = (ScrArea *)ptr->data;
+ /* Running update without having called 'set', see: T64049 */
+ if (sa->butspacetype == SPACE_EMPTY) {
+ return;
+ }
+
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win;
/* XXX this call still use context, so we trick it to work in the right context */
for (win = wm->windows.first; win; win = win->next) {
if (sc == WM_window_get_active_screen(win)) {