summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-01-12 20:15:56 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-01-12 20:15:56 (GMT)
commit694ff33145467a9d8a0f87317124bc5c4251d18d (patch)
tree5d509c082417791add4356e4d512c7526adeeebc /Swiften/Client
parent52cc4918673a80739ae67c99943273339e848458 (diff)
downloadswift-contrib-694ff33145467a9d8a0f87317124bc5c4251d18d.zip
swift-contrib-694ff33145467a9d8a0f87317124bc5c4251d18d.tar.bz2
Refactored MUC code a bit.
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/DummyStanzaChannel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/Client/DummyStanzaChannel.h b/Swiften/Client/DummyStanzaChannel.h
index d9fb138..5784788 100644
--- a/Swiften/Client/DummyStanzaChannel.h
+++ b/Swiften/Client/DummyStanzaChannel.h
@@ -57,6 +57,9 @@ namespace Swift {
}
template<typename T> boost::shared_ptr<T> getStanzaAtIndex(size_t index) {
+ if (sentStanzas.size() <= index) {
+ return boost::shared_ptr<T>();
+ }
return boost::dynamic_pointer_cast<T>(sentStanzas[index]);
}