summaryrefslogtreecommitdiff
path: root/orkaudio/BatchProcessing.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-07-11 18:56:16 +0000
committerHenri Herscher <henri@oreka.org>2006-07-11 18:56:16 +0000
commit90f521dfe34909672ebfead5ef2ba87742c33cdd (patch)
tree6dd70490a64081eba6dde4daf9d1ff3c7eee99aa /orkaudio/BatchProcessing.cpp
parente88b6fb3ba37a5c7547f415c13a2053d8d5c32fc (diff)
Make sure the singleton cannot be instanciated twice
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@298 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/BatchProcessing.cpp')
-rw-r--r--orkaudio/BatchProcessing.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/orkaudio/BatchProcessing.cpp b/orkaudio/BatchProcessing.cpp
index 31439af..78cbf9a 100644
--- a/orkaudio/BatchProcessing.cpp
+++ b/orkaudio/BatchProcessing.cpp
@@ -25,8 +25,11 @@ TapeProcessorRef BatchProcessing::m_singleton;
void BatchProcessing::Initialize()
{
- m_singleton.reset(new BatchProcessing());
- TapeProcessorRegistry::instance()->RegisterTapeProcessor(m_singleton);
+ if(m_singleton.get == NULL)
+ {
+ m_singleton.reset(new BatchProcessing());
+ TapeProcessorRegistry::instance()->RegisterTapeProcessor(m_singleton);
+ }
}