diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-26 17:24:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-26 17:24:52 +0400 |
commit | aba62b1797c4b449df02b8e98af059b833e6a6ee (patch) | |
tree | 63bb17dda281f14d1ee0a4db733ff736ab3998bc /source | |
parent | 892851f787fb4613a297ecb350df114b379ab21b (diff) |
fix for crash running the file load operator in background mode:
bpy.ops.wm.open_mainfile(filepath="some.blend")
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 1357b96fe70..be6ef77526e 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -220,7 +220,9 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) if(win->active) wm->winactive= win; - GHOST_SetWindowUserData(win->ghostwin, win); /* pointer back */ + if(!G.background) /* file loading in background mode still calls this */ + GHOST_SetWindowUserData(win->ghostwin, win); /* pointer back */ + oldwin->ghostwin= NULL; win->eventstate= oldwin->eventstate; |