summaryrefslogtreecommitdiffstats
path: root/include/utils/Singleton.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils/Singleton.h')
-rw-r--r--include/utils/Singleton.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/utils/Singleton.h b/include/utils/Singleton.h
index 3b975b4..e1ee8eb 100644
--- a/include/utils/Singleton.h
+++ b/include/utils/Singleton.h
@@ -37,6 +37,11 @@ public:
}
return *instance;
}
+
+ static bool hasInstance() {
+ Mutex::Autolock _l(sLock);
+ return sInstance != 0;
+ }
protected:
~Singleton() { };