From f2b6bc6e16674c94d491f0b91ed7e8e0ac5dab42 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Fri, 15 Jul 2016 07:01:09 +0200 Subject: [PATCH] Fix NPE at Database.java line 199. --- src/main/java/de/fabianonline/telegram_backup/Database.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/fabianonline/telegram_backup/Database.java b/src/main/java/de/fabianonline/telegram_backup/Database.java index c568a9a..fbc05b8 100644 --- a/src/main/java/de/fabianonline/telegram_backup/Database.java +++ b/src/main/java/de/fabianonline/telegram_backup/Database.java @@ -195,7 +195,7 @@ public class Database { } ps.setInt(5, msg.getFromId()); - if (msg.getFwdFrom() != null) { + if (msg.getFwdFrom() != null && msg.getFwdFrom().getFromId() != null) { ps.setInt(6, msg.getFwdFrom().getFromId()); } else { ps.setNull(6, Types.INTEGER);