diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-05-30 19:38:57 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-05-30 19:38:57 (GMT) |
commit | b58d7bf2cbc310b097760e6266659f70d2fd5a0a (patch) | |
tree | a9875cabe3fe7602010e6ce8d52478c60c3450ca /Swiften/MUC | |
parent | dae7220aaa62ad12f704e05011e22a36a8c7d981 (diff) | |
download | swift-b58d7bf2cbc310b097760e6266659f70d2fd5a0a.zip swift-b58d7bf2cbc310b097760e6266659f70d2fd5a0a.tar.bz2 |
Don't crash setting a bookmark if initial response didn't have a payload.
Resolves: #417
Diffstat (limited to 'Swiften/MUC')
-rw-r--r-- | Swiften/MUC/MUCBookmarkManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/MUC/MUCBookmarkManager.cpp b/Swiften/MUC/MUCBookmarkManager.cpp index cc1c8d6..77921e9 100644 --- a/Swiften/MUC/MUCBookmarkManager.cpp +++ b/Swiften/MUC/MUCBookmarkManager.cpp @@ -88,6 +88,9 @@ void MUCBookmarkManager::removeBookmark(const MUCBookmark& bookmark) { } void MUCBookmarkManager::flush() { + if (!storage) { + storage = boost::shared_ptr<Storage>(new Storage()); + } // Update the storage element storage->clearRooms(); foreach(const MUCBookmark& bookmark, bookmarks_) { |