From 1898a5fef8d4895c9b8e53b51083b03418c11f9d Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 19 Feb 2015 23:58:40 +0000 Subject: [PATCH] Guard against a crash Torsten encountered once. --- src/GUI/QtLauncher.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GUI/QtLauncher.cxx b/src/GUI/QtLauncher.cxx index 2f1e63445..6964eb9a4 100644 --- a/src/GUI/QtLauncher.cxx +++ b/src/GUI/QtLauncher.cxx @@ -930,7 +930,7 @@ void QtLauncher::onRun() if (m_ui->runwayRadio->isChecked()) { int index = m_ui->runwayCombo->currentData().toInt(); - if (index >= 0) { + if ((index >= 0) && m_selectedAirport) { // explicit runway choice opt->addOption("runway", m_selectedAirport->getRunwayByIndex(index)->ident()); }