CVS commit by waba: Prevent destruction order problem with libraries. Fixes problem with io-slaves hanging on exit. M +2 -1 klibloader.cpp 1.59.2.2 M +2 -0 klibloader.h 1.54.2.1 --- kdelibs/kdecore/klibloader.cpp #1.59.2.1:1.59.2.2 @@ -189,5 +189,6 @@ bool KLibrary::hasSymbol( const char* sy void KLibrary::unload() const { - KLibLoader::self()->unloadLibrary(QFile::encodeName(name())); + if (KLibLoader::s_self) + KLibLoader::s_self->unloadLibrary(QFile::encodeName(name())); } --- kdelibs/kdecore/klibloader.h #1.54:1.54.2.1 @@ -140,4 +140,6 @@ class KLibWrapPrivate; class KLibLoader : public QObject { + friend class KLibrary; + Q_OBJECT public: