# HG changeset patch # User Chris Cannam # Date 1488274054 0 # Node ID 987b406be4b0862ebba8180ea3eff2c4dee40d4a # Parent 239e95ccdbfd9f96fd655fcbb93aaaf1519347f3 Fix crash when trying to set object name on nonexistent model diff -r 239e95ccdbfd -r 987b406be4b0 main/MainWindow.cpp --- a/main/MainWindow.cpp Mon Feb 27 16:52:47 2017 +0000 +++ b/main/MainWindow.cpp Tue Feb 28 09:27:34 2017 +0000 @@ -3959,12 +3959,14 @@ duration, &configurator); - if (input.getModel() == aggregate) { - aggregate->setObjectName(tr("Multiplexed audio")); - m_document->addAggregateModel(aggregate); - } else { - aggregate->aboutToDelete(); - delete aggregate; + if (aggregate) { + if (input.getModel() == aggregate) { + aggregate->setObjectName(tr("Multiplexed audio")); + m_document->addAggregateModel(aggregate); + } else { + aggregate->aboutToDelete(); + delete aggregate; + } } if (!input.getModel()) return;