From d41101c307a88d7142bec0221044561e6c0fb09c Mon Sep 17 00:00:00 2001 From: subtly Date: Sat, 4 Apr 2015 17:22:54 +0200 Subject: [PATCH] log nullptr from cap() --- libwhisper/WhisperHost.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libwhisper/WhisperHost.cpp b/libwhisper/WhisperHost.cpp index 673448051..b8cd39d19 100644 --- a/libwhisper/WhisperHost.cpp +++ b/libwhisper/WhisperHost.cpp @@ -163,7 +163,13 @@ void WhisperHost::uninstallWatch(unsigned _i) void WhisperHost::doWork() { for (auto i: peerSessions()) - i.first->cap()->sendMessages(); + { + auto w = i.first->cap(); + if (w) + w->sendMessages(); + else + cwarn << "cap() returned nullptr"; + } cleanup(); }