diff options
Diffstat (limited to 'src/3rdparty/phonon/phonon/globalstatic_p.h')
-rw-r--r-- | src/3rdparty/phonon/phonon/globalstatic_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/3rdparty/phonon/phonon/globalstatic_p.h b/src/3rdparty/phonon/phonon/globalstatic_p.h index cf80512..d615910 100644 --- a/src/3rdparty/phonon/phonon/globalstatic_p.h +++ b/src/3rdparty/phonon/phonon/globalstatic_p.h @@ -260,7 +260,7 @@ static struct PHONON_GLOBAL_STATIC_STRUCT_NAME(NAME) } \ inline TYPE *operator->() \ { \ - TYPE *p = _k_static_##NAME; \ + TYPE *p = _k_static_##NAME.load(); \ if (!p) { \ if (isDestroyed()) { \ qFatal("Fatal Error: Accessed global static '%s *%s()' after destruction. " \ @@ -269,7 +269,7 @@ static struct PHONON_GLOBAL_STATIC_STRUCT_NAME(NAME) p = new TYPE ARGS; \ if (!_k_static_##NAME.testAndSetOrdered(0, p)) { \ delete p; \ - p = _k_static_##NAME; \ + p = _k_static_##NAME.load(); \ } else { \ static Phonon::CleanUpGlobalStatic cleanUpObject = { destroy }; \ } \ @@ -283,8 +283,8 @@ static struct PHONON_GLOBAL_STATIC_STRUCT_NAME(NAME) static void destroy() \ { \ _k_static_##NAME##_destroyed = true; \ - TYPE *x = _k_static_##NAME; \ - _k_static_##NAME = 0; \ + TYPE *x = _k_static_##NAME.load(); \ + _k_static_##NAME.store(0); \ delete x; \ } \ } NAME; |