Merge "hal: Fix for a native crash in select_devices"