Merge "hal : Add NULL check before dereferencing pointer"