summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-05-18 19:34:45 +0000
committerHenri Herscher <henri@oreka.org>2006-05-18 19:34:45 +0000
commiteeb70797cfcafb081dc758d17871e77ec0784037 (patch)
treeae4638edb5c754652afc2575f386711493e1fc7f
parent1f60c821a33203576db8ba0e5ec8660881c741cf (diff)
Now checks for null pointer before trying to close and delete files in exception handler (was crash prone)
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@237 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r--orkaudio/BatchProcessing.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/orkaudio/BatchProcessing.cpp b/orkaudio/BatchProcessing.cpp
index 0b5ad4d..6fb3fa5 100644
--- a/orkaudio/BatchProcessing.cpp
+++ b/orkaudio/BatchProcessing.cpp
@@ -275,13 +275,13 @@ void BatchProcessing::ThreadHandler(void *args)
catch (CStdString& e)
{
LOG4CXX_ERROR(LOG.batchProcessingLog, CStdString("Th") + threadIdString + " " + e);
- fileRef->Close();
- outFileRef->Close();
+ if(fileRef.get()) {fileRef->Close();}
+ if(outFileRef.get()) {outFileRef->Close();}
if(CONFIG.m_deleteFailedCaptureFile && fileRef.get() != NULL)
{
LOG4CXX_INFO(LOG.batchProcessingLog, CStdString("Th") + threadIdString + " deleting native and transcoded");
- fileRef->Delete();
- outFileRef->Delete();
+ if(fileRef.get()) {fileRef->Delete();}
+ if(outFileRef.get()) {outFileRef->Delete();}
}
}
//catch(...)