summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qfactoryloader.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2011-03-10 13:43:22 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2011-03-10 13:43:22 (GMT)
commit306d16002220b99ad386fb1255034b94861a8c9f (patch)
tree1da1a91756e396e134173caeb4772f3f466033a4 /src/corelib/plugin/qfactoryloader.cpp
parentf82f128451ef78e968c85944af10e0e54dbb73c5 (diff)
parent5c36cc0ba648d5efa7592e86d49b23086cdbb8ff (diff)
downloadQt-306d16002220b99ad386fb1255034b94861a8c9f.zip
Qt-306d16002220b99ad386fb1255034b94861a8c9f.tar.gz
Qt-306d16002220b99ad386fb1255034b94861a8c9f.tar.bz2
Merge branch 'master-upstream'
Diffstat (limited to 'src/corelib/plugin/qfactoryloader.cpp')
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 1be32ad..c0b947a 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -155,9 +155,11 @@ void QFactoryLoader::update()
continue;
}
QObject *instance = library->instance();
- if (!instance)
+ if (!instance) {
+ library->release();
// ignore plugins that have a valid signature but cannot be loaded.
continue;
+ }
QFactoryInterface *factory = qobject_cast<QFactoryInterface*>(instance);
if (instance && factory && instance->qt_metacast(d->iid))
keys = factory->keys();