GP: Fix unreported crash when use Alt key in Surface draw
authorAntonioya <blendergit@gmail.com>
Fri, 7 Sep 2018 07:29:33 +0000 (09:29 +0200)
committerAntonioya <blendergit@gmail.com>
Fri, 7 Sep 2018 07:29:33 +0000 (09:29 +0200)
source/blender/editors/gpencil/gpencil_paint.c

index da03da7b40e3cf133de25e8a8fc83ed30ffed6c4..27eba6581db3bae7caec5925390ba12718021993 100644 (file)
@@ -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;
                        }
                }