Merge "hal: fix null pointer reference"