mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-23 10:27:57 +00:00
Fix NPE
This commit is contained in:
parent
b373c28cdd
commit
03ea5eae4c
@ -250,14 +250,20 @@ public class CustomDevicesActivity extends BaseActivity<ActivityCustomDevicesBin
|
|||||||
showEmptyListMessageIfRequired();
|
showEmptyListMessageIfRequired();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Context context = addDeviceDialog.getContext();
|
||||||
|
if (context != null) {
|
||||||
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_duplicate, Toast.LENGTH_SHORT).show();
|
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_duplicate, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
|
Context context = addDeviceDialog.getContext();
|
||||||
|
if (context != null) {
|
||||||
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_invalid, Toast.LENGTH_SHORT).show();
|
Toast.makeText(addDeviceDialog.getContext(), R.string.device_host_invalid, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss() {
|
public void onDismiss() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user