Explorar o código

Fix Text rendering on texture. (#503)

Pavel Alexandrov %!s(int64=6) %!d(string=hai) anos
pai
achega
4a13642a65
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      h2d/Text.hx

+ 1 - 1
h2d/Text.hx

@@ -100,7 +100,7 @@ class Text extends Drawable {
 			emitTile(ctx, h2d.Tile.fromColor(0xFF00FF, 16, 16));
 			return;
 		}
-		if ( !calcDone ) initGlyphs(text, false);
+		if ( !calcDone && text != null && font != null ) initGlyphs(text);
 
 		if( dropShadow != null ) {
 			var oldX = absX, oldY = absY;