-rw-r--r-- | core/launcher/irserver.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp index b22e064..2147d0a 100644 --- a/core/launcher/irserver.cpp +++ b/core/launcher/irserver.cpp @@ -11,18 +11,18 @@ #include <qdir.h> IrServer::IrServer( QObject *parent, const char *name ) : QObject( parent, name ) { lib = 0; + iface = 0; QString path = QPEApplication::qpeDir() + "/plugins/obex/"; QDir dir( path, "lib*.so" ); QStringList list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { - ObexInterface *iface = 0; QLibrary *trylib = new QLibrary( path + *it ); qDebug("trying lib %s", (path + (*it)).latin1() ); if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) { lib = trylib; qDebug("found obex lib" ); QString lang = getenv( "LANG" ); @@ -43,8 +43,10 @@ IrServer::IrServer( QObject *parent, const char *name ) if ( !lib ) qDebug("could not load IR plugin" ); } IrServer::~IrServer() { + if ( iface ) + iface->release(); delete lib; } |