Don't terminate the core due to backend issues while setting up
[quassel.git] / src / core / core.cpp
index 450bc04..0cf3b1e 100644 (file)
@@ -381,10 +381,15 @@ bool Core::initStorage(const QString &backend, const QVariantMap &settings, bool
             return false;  // trigger setup process
         if (storage->setup(settings))
             return initStorage(backend, settings, false);
+        return false;
+
     // if initialization wasn't successful, we quit to keep from coming up unconfigured
     case Storage::NotAvailable:
         qCritical() << "FATAL: Selected storage backend is not available:" << backend;
-        exit(EXIT_FAILURE);
+        if (!setup)
+            exit(EXIT_FAILURE);
+        return false;
+
     case Storage::IsReady:
         // delete all other backends
         _storageBackends.remove(backend);