mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 14:15:14 +00:00
Fix NPE
This commit is contained in:
@@ -107,7 +107,11 @@ public class RunCommandActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
deviceId = getIntent().getStringExtra("deviceId");
|
deviceId = getIntent().getStringExtra("deviceId");
|
||||||
|
|
||||||
boolean canAddCommands = BackgroundService.getInstance().getDevice(deviceId).getPlugin(RunCommandPlugin.class).canAddCommand();
|
boolean canAddCommands = false;
|
||||||
|
try {
|
||||||
|
canAddCommands = BackgroundService.getInstance().getDevice(deviceId).getPlugin(RunCommandPlugin.class).canAddCommand();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
}
|
||||||
|
|
||||||
FloatingActionButton addCommandButton = findViewById(R.id.add_command_button);
|
FloatingActionButton addCommandButton = findViewById(R.id.add_command_button);
|
||||||
if (canAddCommands) {
|
if (canAddCommands) {
|
||||||
|
Reference in New Issue
Block a user