haiku: Don't dereference NULL pointer