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 63166e6..b08a895 100644
--- a/Swiften/Disco/CapsManager.cpp
+++ b/Swiften/Disco/CapsManager.cpp
@@ -50,8 +50,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));