Fixed #5752 (FP (error) Possible null pointer dereference)