Fixed #5303 (Possible NULL pointer dereference in checkassert.cpp)