From 2701223aac892d167ff4726b6c71e35d5cf77c43 Mon Sep 17 00:00:00 2001 From: mgrojo Date: Sun, 29 Jul 2018 14:27:28 +0200 Subject: [PATCH] Crash when browsing a table, deleting it and back to the data browser Following these steps a crash was observed: 1. Browse a Table T in "Browse Data" tab 2. Change to "Database Structure" tab and delete table T 3. Return to "Browse Data" tab The application crashed because the combo still had the deleted table value. It was too soon for the updateInsertDeleteRecordButton() call. Moving it to the end of the method solves the issue. --- src/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 1ac2d871..6307bfea 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -525,8 +525,6 @@ void MainWindow::populateTable() updateInsertDeleteRecordButton(); }); } - updateInsertDeleteRecordButton(); - // Search stored table settings for this table bool storedDataFound = browseTableSettings.contains(tablename); @@ -637,6 +635,8 @@ void MainWindow::populateTable() ui->actionShowRowidColumn->setVisible(false); } + updateInsertDeleteRecordButton(); + QApplication::restoreOverrideCursor(); }