fixed crash caused by 1369871 (NULL pointer)