diff 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
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Thu Nov 01 17:24:38 2007 +0000
+++ b/framework/MainWindowBase.cpp	Fri Nov 02 14:12:17 2007 +0000
@@ -1126,8 +1126,7 @@
 
     if (!il->addImage(m_viewManager->getGlobalCentreFrame(), source.getLocation())) {
         if (newLayer) {
-            m_document->setModel(il, 0); // releasing its model
-            delete il;
+            m_document->deleteLayer(il); // also releases its model
         }
         return FileOpenFailed;
     } else {