Fix crash when clicking close button with no tabs open.
This commit is contained in:
parent
161de60eb1
commit
f5046fbd68
1 changed files with 1 additions and 1 deletions
|
|
@ -208,7 +208,7 @@ void MainWindow::on_tabWidget_tabCloseRequested(int index)
|
||||||
{
|
{
|
||||||
QWidget *widget = ui->tabWidget->widget(index);
|
QWidget *widget = ui->tabWidget->widget(index);
|
||||||
QueryTab *qt = dynamic_cast<QueryTab*>(widget);
|
QueryTab *qt = dynamic_cast<QueryTab*>(widget);
|
||||||
if (qt->canClose()) {
|
if (qt && qt->canClose()) {
|
||||||
ui->tabWidget->removeTab(index);
|
ui->tabWidget->removeTab(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue