Fix potential crashes in optimization code (null pointer dereferencing)
Fix potential crashes in optimization code (null pointer dereferencing)

Davidebyzero/RegexMathEngine,Davidebyzero/RegexMathEngine