summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-02 08:33:34 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-18 19:11:40 (GMT)
commitf51dbfa74459b07487a4f13bf037564ebb8cd506 (patch)
tree4584f8dd0691d3c1ef3e1c64288ff09c0f6dfb0f /Swiften
parentbb37c9f89e4135f3128fc98c23ea19eea945c4cd (diff)
downloadswift-f51dbfa74459b07487a4f13bf037564ebb8cd506.zip
swift-f51dbfa74459b07487a4f13bf037564ebb8cd506.tar.bz2
Assert on empty event in event loop.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/EventLoop/EventLoop.cpp2
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) {