diff options
Diffstat (limited to 'Sluift/sluift.cpp')
-rw-r--r-- | Sluift/sluift.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Sluift/sluift.cpp b/Sluift/sluift.cpp index 0545089..49cfec4 100644 --- a/Sluift/sluift.cpp +++ b/Sluift/sluift.cpp @@ -137,11 +137,14 @@ class SluiftClient { if (watchdog.getTimedOut() || !client->isActive()) { return Stanza::ref(); } - else { + else if (!pendingEvents.empty()) { Stanza::ref event = pendingEvents.front(); pendingEvents.pop_front(); return event; } + else { + return Stanza::ref(); + } } std::vector<XMPPRosterItem> getRoster() { |