Fix this bug in the correct spot by forbidding the controller from trying to toggle the playback state if it hasn't been initialized with a file. Thanks for the tip, Stephan!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27205 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -480,6 +480,7 @@ Controller::TogglePlaying()
|
|||||||
|
|
||||||
BAutolock _(this);
|
BAutolock _(this);
|
||||||
|
|
||||||
|
if (InitCheck() == B_OK)
|
||||||
NodeManager::TogglePlaying();
|
NodeManager::TogglePlaying();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -371,11 +371,8 @@ PlaybackManager::SetCurrentFrame(int64 frame)
|
|||||||
void
|
void
|
||||||
PlaybackManager::SetPlayMode(int32 mode, bool continuePlaying)
|
PlaybackManager::SetPlayMode(int32 mode, bool continuePlaying)
|
||||||
{
|
{
|
||||||
PlayingState* lastState = _LastState();
|
|
||||||
if (lastState == NULL)
|
|
||||||
return;
|
|
||||||
//printf("PlaybackManager::SetPlayMode(%ld, %d)\n", mode, continuePlaying);
|
//printf("PlaybackManager::SetPlayMode(%ld, %d)\n", mode, continuePlaying);
|
||||||
PlayingState* newState = new PlayingState(*lastState);
|
PlayingState* newState = new PlayingState(*_LastState());
|
||||||
newState->play_mode = mode;
|
newState->play_mode = mode;
|
||||||
// Jump to the playing start frame if we should not continue, where we
|
// Jump to the playing start frame if we should not continue, where we
|
||||||
// stop.
|
// stop.
|
||||||
|
|||||||
Reference in New Issue
Block a user