Skip to content

Commit

Permalink
Crash when browsing a table, deleting it and back to the data browser
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgrojo committed Jul 29, 2018
1 parent e1ef492 commit 2701223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Expand Up @@ -525,8 +525,6 @@ void MainWindow::populateTable()
updateInsertDeleteRecordButton();
});
}
updateInsertDeleteRecordButton();

// Search stored table settings for this table
bool storedDataFound = browseTableSettings.contains(tablename);

Expand Down Expand Up @@ -637,6 +635,8 @@ void MainWindow::populateTable()
ui->actionShowRowidColumn->setVisible(false);
}

updateInsertDeleteRecordButton();

QApplication::restoreOverrideCursor();
}

Expand Down

0 comments on commit 2701223

Please sign in to comment.