diff options
-rw-r--r-- | Swift/Controllers/Chat/ChatController.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index e4a76fa..3fffbb1 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp @@ -180,6 +180,10 @@ void ChatController::handlePresenceChange(boost::shared_ptr<Presence> newPresenc if (!me) { return; } + if (!newPresence) { + newPresence = boost::shared_ptr<Presence>(new Presence()); + newPresence->setType(Presence::Unavailable); + } lastShownStatus_ = newPresence->getShow(); chatStateTracker_->handlePresenceChange(newPresence); |