diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-09 20:55:35 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-09 20:55:35 +0400 |
commit | 60da8c1ae0d6d3a0e86b5d6df368194f5904fdfb (patch) | |
tree | 319abd75dd1722ba6a5786507347620472ce8794 /source/blender | |
parent | 990e361a2ccbc5069a8c2defb4f01933d71f97ed (diff) |
Fix #36593: crash duplicating window on OS X in some situations. User data
should be set before GHOST_SetWindowState, since this may generate an event.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 062107f834e..c2672fb060f 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -375,12 +375,12 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win) /* needed so we can detect the graphics card below */ GPU_extensions_init(); - /* set the state*/ - GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate); - win->ghostwin = ghostwin; GHOST_SetWindowUserData(ghostwin, win); /* pointer back */ + /* set the state*/ + GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate); + if (win->eventstate == NULL) win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state"); |