Index: kconfig_compiler.cpp =================================================================== --- kconfig_compiler.cpp (revision 781233) +++ kconfig_compiler.cpp (working copy) @@ -2011,6 +2011,9 @@ if ( singleton ) { if ( dpointer ) cpp << " delete d;" << endl; + cpp << " if (!s_global" << className << ".isDestroyed()) {" << endl; + cpp << " s_global" << className << "->q = 0;" << endl; + cpp << " }" << endl; } cpp << "}" << endl << endl;