Fixed a bug that caused Eniro search results to sometimes have phone number in street...
[jenirok] / src / common / db.cpp
index 83aa85f..ce0cf97 100644 (file)
@@ -73,6 +73,11 @@ void DB::disconnect()
 
 void DB::removeDatabase()
 {
+    if(!initialized_)
+    {
+        return;
+    }
+
     db_.close();
     db_ = QSqlDatabase();
     QSqlDatabase::removeDatabase(QSqlDatabase::defaultConnection);