resets fPlayFile once deleted

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28569 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-11-08 22:41:20 +00:00
parent 0c85bd054e
commit dbbc34b6b2
1 changed files with 7 additions and 4 deletions

View File

@ -1009,12 +1009,14 @@ RecorderWindow::UpdatePlayFile()
return;
}
if (fPlayTrack && fPlayFile)
if (fPlayTrack && fPlayFile) {
fPlayFile->ReleaseTrack(fPlayTrack);
if (fPlayFile)
fPlayTrack = NULL;
}
if (fPlayFile) {
delete fPlayFile;
fPlayTrack = NULL;
fPlayFile = NULL;
fPlayFile = NULL;
}
status_t err;
BEntry& entry = pItem->Entry();
@ -1024,6 +1026,7 @@ RecorderWindow::UpdatePlayFile()
if ((err = fPlayFile->InitCheck()) < B_OK) {
ErrorAlert("get the file to play", err);
delete fPlayFile;
fPlayFile = NULL;
return;
}