Allow getting the map view tab index even if a different main tab is currently opened

This commit is contained in:
Marcus Huderle 2021-12-26 12:17:47 -06:00
parent e070a5a1b2
commit a143d2892e

View file

@ -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();
}