Merge pull request #925 from malord/master

Check for negative dimensions before calling Bitmap.createBitmap.
This commit is contained in:
Mikael Sand
2019-02-09 03:54:42 +02:00
committed by GitHub
@@ -234,7 +234,7 @@ public class SvgView extends ReactViewGroup implements ReactCompoundView, ReactC
height = (float) PropHelper.fromRelative(mbbHeight, parentHeight, 0, mScale, 12);
setMeasuredDimension((int)Math.ceil(width), (int)Math.ceil(height));
}
if (width == 0 || height == 0) {
if (width <= 0 || height <= 0) {
return null;
}
Bitmap bitmap = Bitmap.createBitmap(