summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/DummyStanzaChannel.h')
-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]);
}