]> git.sesse.net Git - kdenlive/commitdiff
Fix geometrywidget crash on exit
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 16 Aug 2010 17:33:11 +0000 (17:33 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 16 Aug 2010 17:33:11 +0000 (17:33 +0000)
svn path=/trunk/kdenlive/; revision=4735

src/mainwindow.cpp
src/mainwindow.h

index b542c6c6b3299c9c17508394cfbd8205fcb6d5e9..7d652a5cb45157dfec4db002cef5f3e80f6992c9 100644 (file)
@@ -466,21 +466,32 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, QWidget *parent
     m_projectListDock->raise();
 }
 
-void MainWindow::queryQuit()
+MainWindow::~MainWindow()
 {
-    if (queryClose()) {
-        if (m_projectMonitor) m_projectMonitor->stop();
-        if (m_clipMonitor) m_clipMonitor->stop();
-        delete m_activeTimeline;
+    m_effectStack->slotClipItemSelected(NULL, 0);
+    m_transitionConfig->slotTransitionItemSelected(NULL, 0, QPoint(), false);
+
+    if (m_projectMonitor) m_projectMonitor->stop();
+    if (m_clipMonitor) m_clipMonitor->stop();
+
+    if (m_activeTimeline) delete m_activeTimeline;
+
+    delete m_effectStack;
+    delete m_transitionConfig;
+
+    if (m_activeDocument) delete m_activeDocument;
 #ifndef Q_WS_MAC
-        // This sometimes causes crash on exit on OS X for some reason.
-        delete m_projectMonitor;
-        delete m_clipMonitor;
+    // This sometimes causes crash on exit on OS X for some reason.
+    delete m_projectMonitor;
+    delete m_clipMonitor;
 #endif
-        delete m_effectStack;
-        delete m_activeDocument;
-        delete m_shortcutRemoveFocus;
-        Mlt::Factory::close();
+    delete m_shortcutRemoveFocus;
+    Mlt::Factory::close();
+}
+
+void MainWindow::queryQuit()
+{
+    if (queryClose()) {
         kapp->quit();
     }
 }
index 116c5661d127a08efedfa78d71cadc7e06419130..694c03370755519eb93bcc85cc82df3e71551d1f 100644 (file)
@@ -83,6 +83,7 @@ public:
      * a default new file will be created. */
     explicit MainWindow(const QString &MltPath = QString(),
                         const KUrl &Url = KUrl(), QWidget *parent = 0);
+    virtual ~MainWindow();
 
     /** @brief Locates the MLT environment.
      * @param mltPath (optional) path to MLT environment