diff options
Diffstat (limited to 'include/utils/Singleton.h')
-rw-r--r-- | include/utils/Singleton.h | 5 |
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() { }; |