]> git.sesse.net Git - kdenlive/commitdiff
Fix crash reported in
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 21 Jan 2009 17:54:22 +0000 (17:54 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 21 Jan 2009 17:54:22 +0000 (17:54 +0000)
http://www.kdenlive.org:80/mantis/view.php?id=552

svn path=/branches/KDE4/; revision=2936

src/mainwindow.cpp

index f623434450d15b8f3b26e49fb38b15b56d044df9..e397d31469c0df5eb62b6fec6a3b04674347858d 100644 (file)
@@ -1257,8 +1257,7 @@ void MainWindow::openFile(const KUrl &url) {
 }
 
 void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale) {
-    KdenliveDoc *doc;
-    doc = new KdenliveDoc(url, KUrl(), m_commandStack, QString(), QPoint(3, 2), m_projectMonitor->render, this);
+    KdenliveDoc *doc = new KdenliveDoc(url, KUrl(), m_commandStack, QString(), QPoint(3, 2), m_projectMonitor->render, this);
     if (stale == NULL) {
         stale = new KAutoSaveFile(url, doc);
         doc->m_autosave = stale;
@@ -1493,6 +1492,7 @@ void MainWindow::slotUpdateMousePosition(int pos) {
 }
 
 void MainWindow::slotUpdateDocumentState(bool modified) {
+    if (!m_activeDocument) return;
     setCaption(m_activeDocument->description(), modified);
     m_saveAction->setEnabled(modified);
     if (modified) {