Fix a null deref check CID#1108017 #37