diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Message.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index 0a9e5da2..5b44435e 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -96,7 +96,12 @@ public class Message extends AbstractEntity { public static Message fromCursor(Cursor cursor) { Jid jid; try { - jid = Jid.fromString(cursor.getString(cursor.getColumnIndex(COUNTERPART))); + String value = cursor.getString(cursor.getColumnIndex(COUNTERPART)); + if (value!=null) { + jid = Jid.fromString(value); + } else { + jid = null; + } } catch (InvalidJidException e) { jid = null; } |