From 5b839bbae08762cc6012f5941a46bb613801b126 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sat, 26 Nov 2016 13:26:04 +0100 Subject: [PATCH] Fix crash when receiving group request for unkown group Fixes #33 --- src/main/java/org/asamk/signal/Manager.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/asamk/signal/Manager.java b/src/main/java/org/asamk/signal/Manager.java index ee5aeeb3..8de14b2d 100644 --- a/src/main/java/org/asamk/signal/Manager.java +++ b/src/main/java/org/asamk/signal/Manager.java @@ -938,10 +938,14 @@ class Manager implements Signal { } break; case REQUEST_INFO: - try { - sendUpdateGroupMessage(groupInfo.getGroupId(), source); - } catch (IOException | EncapsulatedExceptions e) { - e.printStackTrace(); + if (group != null) { + try { + sendUpdateGroupMessage(groupInfo.getGroupId(), source); + } catch (IOException | EncapsulatedExceptions e) { + e.printStackTrace(); + } catch (NotAGroupMemberException e) { + // We have left this group, so don't send a group update message + } } break; }