mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-27 00:51:44 +01:00
Small safety measure against null device
This commit is contained in:
parent
45cc837f9b
commit
b9f19970df
@ -69,7 +69,8 @@ public class AppManagerActivity extends AbstractGBFragmentActivity {
|
|||||||
Bundle extras = getIntent().getExtras();
|
Bundle extras = getIntent().getExtras();
|
||||||
if (extras != null) {
|
if (extras != null) {
|
||||||
mGBDevice = extras.getParcelable(GBDevice.EXTRA_DEVICE);
|
mGBDevice = extras.getParcelable(GBDevice.EXTRA_DEVICE);
|
||||||
} else {
|
}
|
||||||
|
if (mGBDevice == null) {
|
||||||
throw new IllegalArgumentException("Must provide a device when invoking this activity");
|
throw new IllegalArgumentException("Must provide a device when invoking this activity");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user