mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-24 22:48:23 -05:00
Fix warning in SQL error log when creating an in-memory database
This fixes an invalid database pointer warning when trying to create a new in-memory database.
This commit is contained in:
+4
-1
@@ -556,7 +556,10 @@ void MainWindow::fileNew()
|
||||
|
||||
void MainWindow::fileNewInMemoryDatabase()
|
||||
{
|
||||
db.create(":memory:");
|
||||
// Open an in-memory database. We use open() instead of create() here because the extra work create() does is not needed
|
||||
// when no files are stored on disk.
|
||||
db.open(":memory:");
|
||||
|
||||
setCurrentFile(tr("In-Memory database"));
|
||||
statusEncodingLabel->setText(db.getPragma("encoding"));
|
||||
statusEncryptionLabel->setVisible(false);
|
||||
|
||||
Reference in New Issue
Block a user