summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-06-18 12:18:45 (GMT)
committerTobias Markmann <tm@ayena.de>2015-06-18 12:18:45 (GMT)
commite9a95bd55757cce0e6e126660bc65561ae007baf (patch)
tree5363498aefd98dc1654c22ed06a7d3975c31b1bf /Swiften/Client
parentc565fb97c2925b66f81e05ffb6a394d3d53173a0 (diff)
downloadswift-e9a95bd55757cce0e6e126660bc65561ae007baf.zip
swift-e9a95bd55757cce0e6e126660bc65561ae007baf.tar.bz2
Only delete HistoryStorage if building with experimental features
Clang raises a warning in non-experimental builds because the full type of HistoryStorage is not known and it tries to delete an instance (even though a null ptr) in the dtor. Test-Information: Tested on OS X 10.9.5 with Clang (Apple LLVM version 6.0). Change-Id: I8a06890967427af21e11e077e9ac59b67bdb810c
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/MemoryStorages.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swiften/Client/MemoryStorages.cpp b/Swiften/Client/MemoryStorages.cpp
index fc65cd5..8825fa2 100644
--- a/Swiften/Client/MemoryStorages.cpp
+++ b/Swiften/Client/MemoryStorages.cpp
@@ -32,7 +32,9 @@ MemoryStorages::~MemoryStorages() {
delete avatarStorage;
delete capsStorage;
delete vcardStorage;
+#ifdef SWIFT_EXPERIMENTAL_HISTORY
delete historyStorage;
+#endif
}
VCardStorage* MemoryStorages::getVCardStorage() const {