Merge "Fix crash when showing the device not found dialog." into main