summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qlibrary.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-08-10 09:10:41 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-10-18 17:10:42 -0700
commit823b7c7bce1aae5d413c9540c4916c7b1f393300 (patch)
treee131dfcf4f47917a71cfd8f927b4f50915a6fdff /src/corelib/plugin/qlibrary.cpp
parent636dbe604596b2860e4f6d9b159fc017dcd2f66b (diff)
QLibrary: fix load() after a failed load()
Regression introduced by commit 8d4eb292b2e8fc14437db97febdc2eebe36ed3ce in 6.0, when QTaggedPointer was introduced. We set the tag even when the loading failed and failed to reset it because d = {} retains the tag. Pick-to: 6.2 6.4 Fixes: QTBUG-103387 Change-Id: Ie4bb662dcb274440ab8bfffd170a07aa9c9ecfca Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/plugin/qlibrary.cpp')
-rw-r--r--src/corelib/plugin/qlibrary.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 8c99520aba..26b110b7de 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -776,9 +776,11 @@ bool QLibrary::load()
return false;
if (d.tag() == Loaded)
return d->pHnd.loadRelaxed();
- else
+ if (d->load()) {
d.setTag(Loaded);
- return d->load();
+ return true;
+ }
+ return false;
}
/*!