diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-08-19 21:46:47 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-08-19 21:46:47 +0200 |
commit | cf909afc60dd6e36a7cebcdec3089bf34768382b (patch) | |
tree | 53a685923069727301673fe2a9e5a459bb8cedb4 | |
parent | 2a139a4b47ba0c396adeea161d85c40080ab2f4b (diff) |
check for rare null pointer platform bug in share intent handling
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 11ba7c71..d57cc53e 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1268,9 +1268,11 @@ public class ConversationActivity extends XmppActivity } Uri uri = intent.getData(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && uri == null) { - ClipData clipData = intent.getClipData(); - for (int i = 0; i < clipData.getItemCount(); ++i) { - uris.add(clipData.getItemAt(i).getUri()); + final ClipData clipData = intent.getClipData(); + if (clipData != null) { + for (int i = 0; i < clipData.getItemCount(); ++i) { + uris.add(clipData.getItemAt(i).getUri()); + } } } else { uris.add(uri); |