diff options
author | Ton Roosendaal <ton@blender.org> | 2013-06-01 19:24:15 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-06-01 19:24:15 +0400 |
commit | c6d1b6c3fc27558887bc5d4c06b147398f913284 (patch) | |
tree | da000a9e0d55ece1b6411e1fee4a2e131e2efe39 /source/blender/windowmanager/intern/wm_window.c | |
parent | 26ce8bfada1f513101c0362e7636fcf49af863cd (diff) |
Bug fix, own collection while testing
New OSX "Life resize" was also being called during opening of windows - when things are
not initialized yet. Crashed on opening full-screen window (which is animated in OSX).
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index b66e7f3c8cb..d7379d426ce 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -711,6 +711,11 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr GHOST_TEventDataPtr data = GHOST_GetEventData(evt); wmWindow *win; + /* Ghost now can call this function for life resizes, but it should return if WM didn't initialize yet. + Can happen on file read (especially full size window) */ + if ((wm->initialized & WM_INIT_WINDOW) == 0) { + return 1; + } if (!ghostwin) { /* XXX - should be checked, why are we getting an event here, and */ /* what is it? */ |