Canvas: fix NullPointerException in setBitmap()

This commit is contained in:
Julian Winkler
2025-02-15 08:21:30 +01:00
parent 469001630f
commit 1eb0a5074f

View File

@@ -380,7 +380,7 @@ public class Canvas {
}
public void setBitmap(Bitmap bitmap) {
if (!bitmap.isMutable()) {
if (bitmap != null && !bitmap.isMutable()) {
throw new IllegalStateException("Bitmap must be mutable");
}
this.bitmap = bitmap;