Skip to content

Commit

Permalink
fix crash on playback with prop without blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Jun 21, 2024
1 parent 6d64291 commit 8a6976b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Source/Prop/Prop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,14 @@ void Prop::updatePlaybackModeOnProp()
String filename = currentBlock != nullptr ? currentBlock->shortName : (playbackFileName->enabled ? playbackFileName->stringValue() : "");
if (filename.isNotEmpty()) loadPlayback(filename, false);

if (BentoSequenceBlock* bs = dynamic_cast<BentoSequenceBlock*>(currentBlock->provider.get()))
if (currentBlock != nullptr)
{
if (!bs->sequence->isPlaying->boolValue()) seekPlaybackPlaying(bs->sequence->currentTime->floatValue());
else playPlayback(bs->sequence->currentTime->floatValue());

if (BentoSequenceBlock* bs = dynamic_cast<BentoSequenceBlock*>(currentBlock->provider.get()))
{
if (!bs->sequence->isPlaying->boolValue()) seekPlaybackPlaying(bs->sequence->currentTime->floatValue());
else playPlayback(bs->sequence->currentTime->floatValue());
}
}

}
Expand Down

0 comments on commit 8a6976b

Please sign in to comment.