* avoids crashing when fPlayList is already gone on quitting.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35307 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2010-01-27 00:22:48 +00:00
parent 384eec9bc3
commit 96cddcb711
1 changed files with 3 additions and 0 deletions

View File

@ -290,6 +290,7 @@ MainWin::~MainWin()
fPlaylistWindow->Quit();
delete fPlaylist;
fPlaylist = NULL;
// quit the Controller looper thread
thread_id controllerThread = fController->Thread();
@ -1057,6 +1058,8 @@ MainWin::GetQuitMessage(BMessage* message)
playlistArchive.AddInt64("position", fController->TimePosition());
controllerLocker.Unlock();
if (!fPlaylist)
return;
BAutolock playlistLocker(fPlaylist);
if (fPlaylist->Archive(&playlistArchive) != B_OK
|| playlistArchive.AddInt32("index",