From 86682f0390e47a29822de7d76de2e12e7586df16 Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Thu, 14 Feb 2019 20:29:30 -0500 Subject: [PATCH] Fix for segfault when trying to use playback window without anything loaded. --- frameplaybackobject.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frameplaybackobject.cpp b/frameplaybackobject.cpp index 0310141..e990efe 100644 --- a/frameplaybackobject.cpp +++ b/frameplaybackobject.cpp @@ -13,6 +13,7 @@ FramePlaybackObject::FramePlaybackObject() playbackForward = true; useOrigTiming = false; whichBusSend = 0; + currentSeqItem = nullptr; } FramePlaybackObject::~FramePlaybackObject() @@ -25,6 +26,12 @@ FramePlaybackObject::~FramePlaybackObject() quint64 FramePlaybackObject::updatePosition(bool forward) { //qDebug() << "updatePosition"; + if (!currentSeqItem) { + playbackTimer->stop(); //pushing this button halts automatic playback + playbackActive = false; + currentPosition = 0; + return 0; + } if (forward) { if (currentPosition < (currentSeqItem->data.count() - 1)) currentPosition++; //still in same file so keep going