[Bf-blender-cvs] [04e363376ba] blender2.8: WM: Fix a crash (assert) when creating a new window.

Clément Foucault noreply at git.blender.org
Tue Apr 10 17:42:54 CEST 2018


Commit: 04e363376ba234e860c73340f073df619e563a24
Author: Clément Foucault
Date:   Tue Apr 10 17:41:30 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB04e363376ba234e860c73340f073df619e563a24

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.

===================================================================

M	source/blender/windowmanager/intern/wm_window.c

===================================================================

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 */



More information about the Bf-blender-cvs mailing list