Skip to content

Commit 1b0cae0

Browse files
committed
fix: Added missing null-check
1 parent 207c2a0 commit 1b0cae0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
Binary file not shown.

packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/BoxShadowDrawable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public void draw(Canvas canvas) {
8383

8484
canvas.restore();
8585

86-
if (_wrappedDrawable != null) {
87-
_wrappedDrawable.draw(canvas);
86+
if (this._wrappedDrawable != null) {
87+
this._wrappedDrawable.draw(canvas);
8888
}
8989
}
9090

packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/Utils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ public static void drawBoxShadow(View view, int[] values) {
127127

128128
if (background instanceof BoxShadowDrawable) {
129129
wrappedBg = ((BoxShadowDrawable) background).getWrappedDrawable();
130-
Log.d("BoxShadowDrawable", "already a BoxShadowDrawable, getting wrapped drawable:" + wrappedBg.getClass().getName());
130+
131+
if (wrappedBg != null) {
132+
Log.d("BoxShadowDrawable", "already a BoxShadowDrawable, getting wrapped drawable:" + wrappedBg.getClass().getName());
133+
}
131134
} else {
132135
wrappedBg = background;
133136
}

0 commit comments

Comments
 (0)