diff options
author | louiz’ <louiz@louiz.org> | 2018-01-22 20:57:34 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-01-22 20:57:34 +0100 |
commit | 06271729e33300cebbd7222f50a2b38905e33cae (patch) | |
tree | 380103161b93691b75c127f481e93351b8582f9b /src/xmpp | |
parent | 6e1af8b082379a2cf0aafc8c7929bea465b9d8aa (diff) | |
download | biboumi-06271729e33300cebbd7222f50a2b38905e33cae.tar.gz biboumi-06271729e33300cebbd7222f50a2b38905e33cae.tar.bz2 biboumi-06271729e33300cebbd7222f50a2b38905e33cae.tar.xz biboumi-06271729e33300cebbd7222f50a2b38905e33cae.zip |
Fix a crash happening when a user cancels a non-existing ad-hoc session
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/adhoc_commands_handler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmpp/adhoc_commands_handler.cpp b/src/xmpp/adhoc_commands_handler.cpp index e4dcd5c..bb48781 100644 --- a/src/xmpp/adhoc_commands_handler.cpp +++ b/src/xmpp/adhoc_commands_handler.cpp @@ -83,7 +83,7 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, co XmlSubNode next(actions, "next"); } } - else if (action == "cancel") + else if (session_it != this->sessions.end() && action == "cancel") { this->sessions.erase(session_it); command_node["status"] = "canceled"; |