Merge "Fix font golden image using Oracle JDK"
diff --git a/bridge/src/android/view/RectShadowPainter.java b/bridge/src/android/view/RectShadowPainter.java
index 43f4ebc..e4b2020 100644
--- a/bridge/src/android/view/RectShadowPainter.java
+++ b/bridge/src/android/view/RectShadowPainter.java
@@ -127,6 +127,9 @@
private static void paintGeometricShadow(@NonNull float[][] coordinates, float lightPosX,
float lightPosY, float lightHeight, float lightSize, Canvas canvas) {
+ if (canvas == null || canvas.getWidth() == 0 || canvas.getHeight() == 0) {
+ return;
+ }
// The polygon of shadow (same as the original item)
float[] shadowPoly = new float[coordinates.length * 3];