From: James Turner Date: Thu, 19 Feb 2015 23:58:40 +0000 (+0000) Subject: Guard against a crash Torsten encountered once. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1898a5fef8d4895c9b8e53b51083b03418c11f9d;p=flightgear.git Guard against a crash Torsten encountered once. --- 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()); }