diff options
author | Henri Herscher <henri@oreka.org> | 2006-07-11 18:56:16 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2006-07-11 18:56:16 +0000 |
commit | 90f521dfe34909672ebfead5ef2ba87742c33cdd (patch) | |
tree | 6dd70490a64081eba6dde4daf9d1ff3c7eee99aa /orkaudio/BatchProcessing.cpp | |
parent | e88b6fb3ba37a5c7547f415c13a2053d8d5c32fc (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.cpp | 7 |
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); + } } |