comparison framework/MainWindowBase.cpp @ 52:43ad8d909e28

* Fix #1815930 new crash, just introduced!
author Chris Cannam
date Fri, 02 Nov 2007 14:12:17 +0000
parents 73f682a551dc
children de2b3c6479c8
comparison
equal deleted inserted replaced
51:e41af8419d4a 52:43ad8d909e28
1124 1124
1125 std::cerr << "openImage: trying location \"" << source.getLocation().toStdString() << "\" in image layer" << std::endl; 1125 std::cerr << "openImage: trying location \"" << source.getLocation().toStdString() << "\" in image layer" << std::endl;
1126 1126
1127 if (!il->addImage(m_viewManager->getGlobalCentreFrame(), source.getLocation())) { 1127 if (!il->addImage(m_viewManager->getGlobalCentreFrame(), source.getLocation())) {
1128 if (newLayer) { 1128 if (newLayer) {
1129 m_document->setModel(il, 0); // releasing its model 1129 m_document->deleteLayer(il); // also releases its model
1130 delete il;
1131 } 1130 }
1132 return FileOpenFailed; 1131 return FileOpenFailed;
1133 } else { 1132 } else {
1134 if (newLayer) { 1133 if (newLayer) {
1135 m_document->addLayerToView(pane, il); 1134 m_document->addLayerToView(pane, il);