diff options
Diffstat (limited to 'autotests/kconfig_compiler/test4.cpp.ref')
-rw-r--r-- | autotests/kconfig_compiler/test4.cpp.ref | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/autotests/kconfig_compiler/test4.cpp.ref b/autotests/kconfig_compiler/test4.cpp.ref index fb4db2ff..2e7ad7d7 100644 --- a/autotests/kconfig_compiler/test4.cpp.ref +++ b/autotests/kconfig_compiler/test4.cpp.ref @@ -10,7 +10,7 @@ class Test4Helper { public: Test4Helper() : q(nullptr) {} - ~Test4Helper() { delete q; } + ~Test4Helper() { delete q; q = nullptr; } Test4Helper(const Test4Helper&) = delete; Test4Helper& operator=(const Test4Helper&) = delete; Test4 *q; @@ -178,6 +178,8 @@ QColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black }; Test4::~Test4() { - s_globalTest4()->q = nullptr; + if (s_globalTest4.exists() && !s_globalTest4.isDestroyed()) { + s_globalTest4()->q = nullptr; + } } |