diff --git a/libwhisper/WhisperHost.cpp b/libwhisper/WhisperHost.cpp index b8cd39d19..97a24e112 100644 --- a/libwhisper/WhisperHost.cpp +++ b/libwhisper/WhisperHost.cpp @@ -163,13 +163,7 @@ void WhisperHost::uninstallWatch(unsigned _i) void WhisperHost::doWork() { for (auto i: peerSessions()) - { - auto w = i.first->cap(); - if (w) - w->sendMessages(); - else - cwarn << "cap() returned nullptr"; - } + i.first->cap().get()->sendMessages(); cleanup(); }