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.
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user