From dbbc34b6b2a22f339ac7fa627505ec78ff9720e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 8 Nov 2008 22:41:20 +0000 Subject: [PATCH] resets fPlayFile once deleted git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28569 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/soundrecorder/RecorderWindow.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/apps/soundrecorder/RecorderWindow.cpp b/src/apps/soundrecorder/RecorderWindow.cpp index e69ef8a3bf..1ff29105b6 100644 --- a/src/apps/soundrecorder/RecorderWindow.cpp +++ b/src/apps/soundrecorder/RecorderWindow.cpp @@ -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; }