[Bf-blender-cvs] [5d80b481b48] greasepencil-refactor: GPencil: Refactor: Avoid crash when using the render pipeline

Clément Foucault noreply at git.blender.org
Tue Dec 10 02:27:38 CET 2019


Commit: 5d80b481b48fdfcb54a6aadfb07ef79ef128d763
Author: Clément Foucault
Date:   Tue Dec 10 01:01:19 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB5d80b481b48fdfcb54a6aadfb07ef79ef128d763

GPencil: Refactor: Avoid crash when using the render pipeline

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 1d8629209df..02d2cdbd1a8 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -295,11 +295,6 @@ static void GPENCIL_engine_init_new(void *ved)
 
 void GPENCIL_engine_init(void *vedata)
 {
-  if (G.debug_value == 50) {
-    GPENCIL_engine_init_new(vedata);
-    return;
-  }
-
   GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
   /* init storage */
   if (!stl->storage) {
@@ -310,6 +305,11 @@ void GPENCIL_engine_init(void *vedata)
 
   stl->storage->multisamples = U.gpencil_multisamples;
 
+  if (G.debug_value == 50) {
+    GPENCIL_engine_init_new(vedata);
+    return;
+  }
+
   /* create shaders */
   GPENCIL_create_shaders();
   GPENCIL_create_fx_shaders(&e_data);



More information about the Bf-blender-cvs mailing list