Fix NULL dereference (CID#236)