From kde-commits Wed Feb 26 18:00:15 2003 From: Waldo Bastian Date: Wed, 26 Feb 2003 18:00:15 +0000 To: kde-commits Subject: KDE_3_1_BRANCH: kdelibs/kdecore X-MARC-Message: https://marc.info/?l=kde-commits&m=104628253018987 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: