Closed hanlins closed 4 years ago
If OS device is not initialized, then current code will panic since it will cast nil into int. Fix the nil pointer referencing and only perform casting when the device is already initialized.
nil
int
If OS device is not initialized, then current code will panic since it will cast
nil
intoint
. Fix the nil pointer referencing and only perform casting when the device is already initialized.