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:
Rene Gollent 2008-08-26 02:32:13 +00:00
parent 6163f3334b
commit 21cc1202f3
2 changed files with 3 additions and 5 deletions

View File

@ -480,7 +480,8 @@ Controller::TogglePlaying()
BAutolock _(this);
NodeManager::TogglePlaying();
if (InitCheck() == B_OK)
NodeManager::TogglePlaying();
}

View File

@ -371,11 +371,8 @@ PlaybackManager::SetCurrentFrame(int64 frame)
void
PlaybackManager::SetPlayMode(int32 mode, bool continuePlaying)
{
PlayingState* lastState = _LastState();
if (lastState == NULL)
return;
//printf("PlaybackManager::SetPlayMode(%ld, %d)\n", mode, continuePlaying);
PlayingState* newState = new PlayingState(*lastState);
PlayingState* newState = new PlayingState(*_LastState());
newState->play_mode = mode;
// Jump to the playing start frame if we should not continue, where we
// stop.