diff options
Diffstat (limited to 'common/storage_common.cpp')
-rw-r--r-- | common/storage_common.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/storage_common.cpp b/common/storage_common.cpp index f648c94..dfcfc2a 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp | |||
@@ -207,6 +207,11 @@ QByteArray DataStore::generateUid() | |||
207 | 207 | ||
208 | DataStore::NamedDatabase DataStore::mainDatabase(const DataStore::Transaction &t, const QByteArray &type) | 208 | DataStore::NamedDatabase DataStore::mainDatabase(const DataStore::Transaction &t, const QByteArray &type) |
209 | { | 209 | { |
210 | if (type.isEmpty()) { | ||
211 | SinkError() << "Tried to open main database for empty type."; | ||
212 | Q_ASSERT(false); | ||
213 | return {}; | ||
214 | } | ||
210 | return t.openDatabase(type + ".main"); | 215 | return t.openDatabase(type + ".main"); |
211 | } | 216 | } |
212 | 217 | ||