mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Close database only if it was opened
This commit is contained in:
@@ -274,8 +274,9 @@ bool MainWindow::fileOpen(const QString& fileName, bool dontAddToRecentFiles)
|
||||
if(QFile::exists(wFile) )
|
||||
{
|
||||
// Close the database. If the user didn't want to close it, though, stop here
|
||||
if(!fileClose())
|
||||
return false;
|
||||
if (db.isOpen())
|
||||
if(!fileClose())
|
||||
return false;
|
||||
|
||||
// Try opening it as a project file first
|
||||
if(loadProject(wFile))
|
||||
|
||||
Reference in New Issue
Block a user