]> git.mxchange.org Git - flightgear.git/commitdiff
Guard against a crash Torsten encountered once.
authorJames Turner <zakalawe@mac.com>
Thu, 19 Feb 2015 23:58:40 +0000 (23:58 +0000)
committerJames Turner <zakalawe@mac.com>
Mon, 23 Feb 2015 18:22:52 +0000 (18:22 +0000)
src/GUI/QtLauncher.cxx

index 2f1e634451da85550bcc1e369089d3f66c69a5e2..6964eb9a46badaf03a03c37d168f19d90fce03e2 100644 (file)
@@ -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());
         }