Browse Source

minor init fix (closed #9)

ncannasse 12 years ago
parent
commit
8b5da97225
1 changed files with 1 additions and 1 deletions
  1. 1 1
      h2d/Text.hx

+ 1 - 1
h2d/Text.hx

@@ -53,7 +53,7 @@ class Text extends Drawable {
 	
 	
 	function set_text(t) {
 	function set_text(t) {
 		this.text = t == null ? "null" : t;
 		this.text = t == null ? "null" : t;
-		if( allocated ) initGlyphs(text);
+		if( allocated && font != null ) initGlyphs(text);
 		return t;
 		return t;
 	}
 	}