Guard against busted replies with no id

Stephen Paul Weber created

Change summary

src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java | 2 
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java 🔗

@@ -1197,7 +1197,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
             try {
                 final var m = Message.fromCursor(cursor, conversation);
                 final var reply = m.getReply();
-                if (reply != null) {
+                if (reply != null && reply.getAttribute("id") != null) { // Guard against busted replies
                     replyIds.add(reply.getAttribute("id"));
                     waitingForReplies.put(reply.getAttribute("id"), m);
                 }