haiku: Fix null pointer reference