[android] Add null check after getting referenced mask, closes #871

This commit is contained in:
Mikael Sand
2018-12-11 21:18:45 +02:00
parent f1aa8df95c
commit 3286005cb9
@@ -248,10 +248,12 @@ abstract public class RenderableView extends VirtualView {
}
void render(Canvas canvas, Paint paint, float opacity) {
MaskView mask = null;
if (mMask != null) {
SvgView root = getSvgView();
MaskView mask = (MaskView) root.getDefinedMask(mMask);
mask = (MaskView) root.getDefinedMask(mMask);
}
if (mask != null) {
Rect clipBounds = canvas.getClipBounds();
int height = clipBounds.height();
int width = clipBounds.width();