Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-04-10 18:41:30 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-04-10 18:42:45 +0300
commit04e363376ba234e860c73340f073df619e563a24 (patch)
tree9b6cd4aea78bb66c2d41900e53d755f2cfc2833e /source/blender/windowmanager/intern
parent3cfca15b50693020261fe3556a04344ef350cf0a (diff)
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.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c5
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 094275920d3..9b0d8db68ce 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -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 */