Check if target is attached to window before trying to mask it.

This commit is contained in:
Alex Hart
2020-02-04 09:47:26 -04:00
committed by GitHub
parent 36a4225858
commit 092fb40333

View File

@@ -67,7 +67,7 @@ public class MaskView extends View {
protected void onDraw(@NonNull Canvas canvas) {
super.onDraw(canvas);
if (target == null) {
if (target == null || !target.isAttachedToWindow()) {
return;
}