# HG changeset patch # User Chris Cannam # Date 1427820406 -3600 # Node ID abd0dea165843a280e49ab6a4ac27a30a2246ad5 # Parent 394923a6455c1b0c9e8984eabdcaaec09f488025 When loading a session, do not import any layers for which the identified models can't be found diff -r 394923a6455c -r abd0dea16584 .hgsubstate --- a/.hgsubstate Tue Mar 31 17:27:28 2015 +0100 +++ b/.hgsubstate Tue Mar 31 17:46:46 2015 +0100 @@ -2,6 +2,6 @@ d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay 1629209f5bf21fc926bb6abd5ab786e78c5d7677 pyin 55ece8862b6d3a54aad271a53f9c1615e5d3bcf8 sv-dependency-builds -1c17a2c5e9177f4ad64f3916569b236696aef5f1 svapp +da520a68595a983bd206c01463549858e3389286 svapp 24c48323c662a3631ba004f4701a328cbf753893 svcore fcbfc7fad1f2bb3af17de67d546ecff16dbdeef4 svgui diff -r 394923a6455c -r abd0dea16584 src/Analyser.cpp --- a/src/Analyser.cpp Tue Mar 31 17:27:28 2015 +0100 +++ b/src/Analyser.cpp Tue Mar 31 17:46:46 2015 +0100 @@ -77,6 +77,8 @@ m_paneStack = paneStack; m_pane = pane; + if (!m_fileModel) return "Internal error: Analyser::newFileLoaded() called with no model present"; + connect(doc, SIGNAL(layerAboutToBeDeleted(Layer *)), this, SLOT(layerAboutToBeDeleted(Layer *))); @@ -95,6 +97,8 @@ if (!m_pane) return "Internal error: Analyser::analyseExistingFile() called with no pane present"; + if (!m_fileModel) return "Internal error: Analyser::analyseExistingFile() called with no model present"; + if (m_layers[PitchTrack]) { m_document->removeLayerFromView(m_pane, m_layers[PitchTrack]); m_layers[PitchTrack] = 0; @@ -225,6 +229,8 @@ QString Analyser::addVisualisations() { + if (!m_fileModel) return "Internal error: Analyser::addVisualisations() called with no model present"; + // A spectrogram, off by default. Must go at the back because it's // opaque