Merge pull request #546 from capi/nullpointer-onnewintent

Fix NullPointerException in onNewIntent()
This commit is contained in:
Felix Ableitner 2016-01-23 23:53:41 +01:00
commit dd49ef2c02
1 changed files with 4 additions and 0 deletions

View File

@ -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);