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