diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java index cb81cb06..a99a8980 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java @@ -284,6 +284,10 @@ public class MainActivity extends SyncthingActivity protected void onNewIntent(Intent intent) { super.onNewIntent(intent); + // intent's action will be null if notification is selected + if (intent.getAction() == null) { + return; + } switch (intent.getAction()) { case ACTION_ADD_DEVICE: final String deviceId = intent.getStringExtra(EXTRA_DEVICE_ID);