mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 15:44:24 +00:00
Fixed NullPointerException
This commit is contained in:
@@ -302,10 +302,10 @@ abstract public class RenderableShadowNode extends VirtualNode {
|
|||||||
int x = Math.round(dst[0]);
|
int x = Math.round(dst[0]);
|
||||||
int y = Math.round(dst[1]);
|
int y = Math.round(dst[1]);
|
||||||
|
|
||||||
if (mRegion == null) {
|
if (mRegion == null && mPath != null) {
|
||||||
mRegion = getRegion(mPath);
|
mRegion = getRegion(mPath);
|
||||||
}
|
}
|
||||||
if (!mRegion.contains(x, y)) {
|
if (mRegion == null || !mRegion.contains(x, y)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -962,10 +962,10 @@ class TSpanShadowNode extends TextShadowNode {
|
|||||||
int x = Math.round(dst[0]);
|
int x = Math.round(dst[0]);
|
||||||
int y = Math.round(dst[1]);
|
int y = Math.round(dst[1]);
|
||||||
|
|
||||||
if (mRegion == null) {
|
if (mRegion == null && mPath != null) {
|
||||||
mRegion = getRegion(mPath);
|
mRegion = getRegion(mPath);
|
||||||
}
|
}
|
||||||
if (!mRegion.contains(x, y)) {
|
if (mRegion == null || !mRegion.contains(x, y)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user