Skip to content

Commit

Permalink
Allow getting the map view tab index even if a different main tab is …
Browse files Browse the repository at this point in the history
…currently opened
  • Loading branch information
huderlem committed Dec 26, 2021
1 parent e070a5a commit a143d28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mainwindow_scriptapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ void MainWindow::setMainTab(int index) {
}

int MainWindow::getMapViewTab() {
if (this->getMainTab() != 0 || !this->ui->mapViewTab)
if (!this->ui || !this->ui->mapViewTab)
return -1;
return this->ui->mapViewTab->currentIndex();
}
Expand Down

0 comments on commit a143d28

Please sign in to comment.