diff options
Diffstat (limited to 'indra/llcommon/llsingleton.h')
-rw-r--r-- | indra/llcommon/llsingleton.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index cd3963b260..00c87821c2 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -174,7 +174,14 @@ public: { return *getInstance(); } - + + // Has this singleton been created uet? + // Use this to avoid accessing singletons before the can safely be constructed + static bool instanceExists() + { + return getData().mInitState == INITIALIZED; + } + // Has this singleton already been deleted? // Use this to avoid accessing singletons from a static object's destructor static bool destroyed() |