mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-05 07:59:28 +00:00
[android] Add null check after getting referenced mask, closes #871
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user