aboutsummaryrefslogtreecommitdiff
path: root/common/singleton.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/singleton.h')
-rw-r--r--common/singleton.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/singleton.h b/common/singleton.h
index 9bcd590183..7deb1dd7dc 100644
--- a/common/singleton.h
+++ b/common/singleton.h
@@ -59,6 +59,10 @@ public:
public:
+ static bool hasInstance() {
+ return _singleton != 0;
+ }
+
static T& instance() {
// TODO: We aren't thread safe. For now we ignore it since the
// only thing using this singleton template is the config manager,