Fix crash error due to use of blur during static initialization

This commit is contained in:
Joshua Granick
2019-04-11 15:13:37 -07:00
parent 7d3539ab8e
commit 668080ac64

View File

@@ -24,6 +24,7 @@ class StackBlur
var radiusX = Math.round(blurX) >> 1;
var radiusY = Math.round(blurY) >> 1;
if (MUL_TABLE == null) return; // can be null due to static initialization order
if (radiusX >= MUL_TABLE.length) radiusX = MUL_TABLE.length - 1;
if (radiusY >= MUL_TABLE.length) radiusY = MUL_TABLE.length - 1;
if (radiusX < 0 || radiusY < 0) return;