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 dc1457e4f7..2e7d845bf7 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -143,7 +143,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() |