aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test8c.cpp.ref
diff options
context:
space:
mode:
Diffstat (limited to 'autotests/kconfig_compiler/test8c.cpp.ref')
-rw-r--r--autotests/kconfig_compiler/test8c.cpp.ref6
1 files changed, 4 insertions, 2 deletions
diff --git a/autotests/kconfig_compiler/test8c.cpp.ref b/autotests/kconfig_compiler/test8c.cpp.ref
index d806ca79..a0878b86 100644
--- a/autotests/kconfig_compiler/test8c.cpp.ref
+++ b/autotests/kconfig_compiler/test8c.cpp.ref
@@ -12,7 +12,7 @@ class Test8cHelper
{
public:
Test8cHelper() : q(nullptr) {}
- ~Test8cHelper() { delete q; }
+ ~Test8cHelper() { delete q; q = nullptr; }
Test8cHelper(const Test8cHelper&) = delete;
Test8cHelper& operator=(const Test8cHelper&) = delete;
Test8c *q;
@@ -63,6 +63,8 @@ Test8c::Test8c( KSharedConfig::Ptr config, QObject *parent )
Test8c::~Test8c()
{
- s_globalTest8c()->q = nullptr;
+ if (s_globalTest8c.exists() && !s_globalTest8c.isDestroyed()) {
+ s_globalTest8c()->q = nullptr;
+ }
}