diff options
Diffstat (limited to 'autotests/kconfig_compiler/test10.cpp.ref')
-rw-r--r-- | autotests/kconfig_compiler/test10.cpp.ref | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/autotests/kconfig_compiler/test10.cpp.ref b/autotests/kconfig_compiler/test10.cpp.ref index 94d9f311..2369d2c3 100644 --- a/autotests/kconfig_compiler/test10.cpp.ref +++ b/autotests/kconfig_compiler/test10.cpp.ref @@ -10,7 +10,7 @@ class Test10Helper { public: Test10Helper() : q(nullptr) {} - ~Test10Helper() { delete q; } + ~Test10Helper() { delete q; q = nullptr; } Test10Helper(const Test10Helper&) = delete; Test10Helper& operator=(const Test10Helper&) = delete; Test10 *q; @@ -43,6 +43,8 @@ Test10::Test10( ) Test10::~Test10() { - s_globalTest10()->q = nullptr; + if (s_globalTest10.exists() && !s_globalTest10.isDestroyed()) { + s_globalTest10()->q = nullptr; + } } |