summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Disco/CapsManager.cpp')
-rw-r--r--Swiften/Disco/CapsManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Disco/CapsManager.cpp b/Swiften/Disco/CapsManager.cpp
index a24d88d..66eb47e 100644
--- a/Swiften/Disco/CapsManager.cpp
+++ b/Swiften/Disco/CapsManager.cpp
@@ -51,8 +51,8 @@ void CapsManager::handleStanzaChannelAvailableChanged(bool available) {
void CapsManager::handleDiscoInfoReceived(const JID& from, const std::string& hash, DiscoInfo::ref discoInfo, ErrorPayload::ref error) {
requestedDiscoInfos.erase(hash);
- if (error || CapsInfoGenerator("").generateCapsInfo(*discoInfo.get()).getVersion() != hash) {
- if (warnOnInvalidHash && !error) {
+ if (error || !discoInfo || CapsInfoGenerator("").generateCapsInfo(*discoInfo.get()).getVersion() != hash) {
+ if (warnOnInvalidHash && !error && discoInfo) {
std::cerr << "Warning: Caps from " << from.toString() << " do not verify" << std::endl;
}
failingCaps.insert(std::make_pair(from, hash));