Layout: fix NullPointerException in constructor

This commit is contained in:
Julian Winkler
2025-02-15 08:21:59 +01:00
parent 1eb0a5074f
commit 0bfe4ba90a

View File

@@ -29,7 +29,7 @@ public class Layout {
this.spacing_mult = spacingMult;
this.spacing_add = spacingAdd;
this.align = align;
layout = native_constructor(text.toString(), paint.paint, width);
layout = native_constructor(text != null ? text.toString() : "", paint.paint, width);
}
public int getLineCount() {