Fix crash with font on curve
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 9 Feb 2018 09:13:42 +0000 (10:13 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 9 Feb 2018 09:14:08 +0000 (10:14 +0100)
Was a mistake from recent texspace changes.

Reported by Pablo here in the studio!

source/blender/blenkernel/intern/font.c

index a314cc0a13122295bf6af989117c94d1365d00fd..5545eba8764a022857010ed0093452aed00becd6 100644 (file)
@@ -1080,8 +1080,13 @@ makebreak:
                        float distfac, imat[4][4], imat3[3][3], cmat[3][3];
                        float minx, maxx, miny, maxy;
                        float timeofs, sizefac;
-                       
-                       invert_m4_m4(imat, ob->obmat);
+
+                       if (ob != NULL) {
+                               invert_m4_m4(imat, ob->obmat);
+                       }
+                       else {
+                               unit_m4(imat);
+                       }
                        copy_m3_m4(imat3, imat);
 
                        copy_m3_m4(cmat, cu->textoncurve->obmat);