mirror of
https://invent.kde.org/network/kdeconnect-android.git
synced 2025-12-12 20:35:58 +01:00
Fix NPE
This commit is contained in:
@@ -250,11 +250,17 @@ public class CustomDevicesActivity extends BaseActivity<ActivityCustomDevicesBin
|
||||
showEmptyListMessageIfRequired();
|
||||
}
|
||||
else {
|
||||
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_duplicate, Toast.LENGTH_SHORT).show();
|
||||
Context context = addDeviceDialog.getContext();
|
||||
if (context != null) {
|
||||
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_duplicate, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_invalid, Toast.LENGTH_SHORT).show();
|
||||
Context context = addDeviceDialog.getContext();
|
||||
if (context != null) {
|
||||
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_invalid, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user