diff options
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/DummyStanzaChannel.h | 3 |
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]); } |