WM: Fix a crash (assert) when creating a new window.
This happened when creating a window with the cursor over the timeline area. I still don't know exactly what happened but for a reason batches were not reset in this case.
This commit is contained in:
parent
3cfca15b50
commit
04e363376b
|
@ -640,6 +640,11 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm
|
|||
if (ghostwin) {
|
||||
GHOST_RectangleHandle bounds;
|
||||
|
||||
/* XXX Fix crash when a new window is created.
|
||||
* However this should be move somewhere else. (fclem) */
|
||||
BLF_batch_reset();
|
||||
gpu_batch_presets_reset();
|
||||
|
||||
win->gwnctx = GWN_context_create();
|
||||
|
||||
/* the new window has already been made drawable upon creation */
|
||||
|
|
Loading…
Reference in New Issue