Fix for segfault when trying to use playback window without anything
loaded.
This commit is contained in:
@@ -13,6 +13,7 @@ FramePlaybackObject::FramePlaybackObject()
|
|||||||
playbackForward = true;
|
playbackForward = true;
|
||||||
useOrigTiming = false;
|
useOrigTiming = false;
|
||||||
whichBusSend = 0;
|
whichBusSend = 0;
|
||||||
|
currentSeqItem = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
FramePlaybackObject::~FramePlaybackObject()
|
FramePlaybackObject::~FramePlaybackObject()
|
||||||
@@ -25,6 +26,12 @@ FramePlaybackObject::~FramePlaybackObject()
|
|||||||
quint64 FramePlaybackObject::updatePosition(bool forward)
|
quint64 FramePlaybackObject::updatePosition(bool forward)
|
||||||
{
|
{
|
||||||
//qDebug() << "updatePosition";
|
//qDebug() << "updatePosition";
|
||||||
|
if (!currentSeqItem) {
|
||||||
|
playbackTimer->stop(); //pushing this button halts automatic playback
|
||||||
|
playbackActive = false;
|
||||||
|
currentPosition = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (forward)
|
if (forward)
|
||||||
{
|
{
|
||||||
if (currentPosition < (currentSeqItem->data.count() - 1)) currentPosition++; //still in same file so keep going
|
if (currentPosition < (currentSeqItem->data.count() - 1)) currentPosition++; //still in same file so keep going
|
||||||
|
|||||||
Reference in New Issue
Block a user