]> git.sesse.net Git - kdenlive/blobdiff - src/markerdialog.cpp
Fix crash on app close
[kdenlive] / src / markerdialog.cpp
index c7702b3b604cedef9df99429f94580be065c2c14..de34f80c55e8279d5cd3fc3e9839d83265d7f9ae 100644 (file)
@@ -56,7 +56,7 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, QWid
             connect(this, SIGNAL(updateThumb()), m_previewTimer, SLOT(start()));
         case IMAGE:
         case TEXT:
-            p = KThumb::getFrame(*m_producer, t.time().frames(m_fps), (int)(100 * m_dar), 100);
+            p = KThumb::getFrame(m_producer, t.time().frames(m_fps), (int)(100 * m_dar), 100);
             break;
         case COLOR:
             colour = colour.replace(0, 2, "#");
@@ -93,14 +93,14 @@ MarkerDialog::~MarkerDialog() {
 void MarkerDialog::slotUpdateThumb() {
     m_previewTimer->stop();
     int pos = m_tc.getFrameCount(m_view.marker_position->text(), m_fps);
-    QPixmap p = KThumb::getFrame(*m_producer, pos, (int)(100 * m_dar), 100);
+    QPixmap p = KThumb::getFrame(m_producer, pos, (int)(100 * m_dar), 100);
     if (!p.isNull()) m_view.clip_thumb->setPixmap(p);
     else kDebug() << "!!!!!!!!!!!  ERROR CREATING THUMB";
 }
 
 void MarkerDialog::slotTimeUp() {
     int duration = m_tc.getFrameCount(m_view.marker_position->text(), m_fps);
-    if (duration >= m_clip->duration().frames(m_fps)) return;
+    if (m_clip && duration >= m_clip->duration().frames(m_fps)) return;
     duration ++;
     m_view.marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps), m_fps));
 }