[Bf-blender-cvs] [9c12f589080] blender2.8: GP: Fix unreported crash when use Alt key in Surface draw

Antonioya noreply at git.blender.org
Fri Sep 7 09:29:48 CEST 2018


Commit: 9c12f589080a6bd4fc452e6b6044914ce49f9341
Author: Antonioya
Date:   Fri Sep 7 09:29:33 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB9c12f589080a6bd4fc452e6b6044914ce49f9341

GP: Fix unreported crash when use Alt key in Surface draw

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

M	source/blender/editors/gpencil/gpencil_paint.c

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

diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index da03da7b40e..27eba6581db 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -386,7 +386,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3]
 
 			 /* verify valid zdepth, if it's wrong, the default darwing mode is used
 			  * and the function doesn't return now */
-			if (*depth <= 1.0f) {
+			if ((depth == NULL) || (*depth <= 1.0f)) {
 				return;
 			}
 		}



More information about the Bf-blender-cvs mailing list