ImageView: check if Drawable actually has a Paintable

This commit is contained in:
Julian Winkler
2024-01-01 12:09:17 +01:00
parent 790255f9ca
commit 52214f47d0

View File

@@ -67,7 +67,7 @@ public class ImageView extends View {
public void setImageDrawable(Drawable drawable) {
if (drawable instanceof BitmapDrawable) {
setImageBitmap(((BitmapDrawable) drawable).getBitmap());
} else if (drawable != null) {
} else if (drawable != null && drawable.paintable != 0) {
native_setDrawable(widget, drawable.paintable);
}
}