diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-04-02 08:33:34 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-18 19:11:40 (GMT) |
commit | f51dbfa74459b07487a4f13bf037564ebb8cd506 (patch) | |
tree | 4584f8dd0691d3c1ef3e1c64288ff09c0f6dfb0f /Swiften/EventLoop | |
parent | bb37c9f89e4135f3128fc98c23ea19eea945c4cd (diff) | |
download | swift-contrib-f51dbfa74459b07487a4f13bf037564ebb8cd506.zip swift-contrib-f51dbfa74459b07487a4f13bf037564ebb8cd506.tar.bz2 |
Assert on empty event in event loop.
Diffstat (limited to 'Swiften/EventLoop')
-rw-r--r-- | Swiften/EventLoop/EventLoop.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Swiften/EventLoop/EventLoop.cpp b/Swiften/EventLoop/EventLoop.cpp index 56bb6ac..510ed63 100644 --- a/Swiften/EventLoop/EventLoop.cpp +++ b/Swiften/EventLoop/EventLoop.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include <boost/bind.hpp> #include <iostream> +#include <cassert> #include <Swiften/Base/Log.h> @@ -17,6 +18,7 @@ namespace Swift { inline void invokeCallback(const Event& event) { try { + assert(!event.callback.empty()); event.callback(); } catch (const std::exception& e) { |