summaryrefslogtreecommitdiff
path: root/orkaudio/Reporting.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/Reporting.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/Reporting.cpp')
-rw-r--r--orkaudio/Reporting.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/orkaudio/Reporting.cpp b/orkaudio/Reporting.cpp
index f03a22c..5d2f7ec 100644
--- a/orkaudio/Reporting.cpp
+++ b/orkaudio/Reporting.cpp
@@ -27,8 +27,11 @@ TapeProcessorRef Reporting::m_singleton;
void Reporting::Initialize()
{
- m_singleton.reset(new Reporting());
- TapeProcessorRegistry::instance()->RegisterTapeProcessor(m_singleton);
+ if(m_singleton.get() == NULL)
+ {
+ m_singleton.reset(new Reporting());
+ TapeProcessorRegistry::instance()->RegisterTapeProcessor(m_singleton);
+ }
}
Reporting* Reporting::Instance()