CVS commit by waba: Prevent destruction order problem with libraries. Fixes problem with io-slaves hanging on exit. M +2 -1 klibloader.cpp 1.61 M +2 -0 klibloader.h 1.57 --- kdelibs/kdecore/klibloader.cpp #1.60:1.61 @@ -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.56:1.57 @@ -143,4 +143,6 @@ class KLibWrapPrivate; class KLibLoader : public QObject { + friend class KLibrary; + Q_OBJECT public: