diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-08-10 09:10:41 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-10-18 17:10:42 -0700 |
commit | 823b7c7bce1aae5d413c9540c4916c7b1f393300 (patch) | |
tree | e131dfcf4f47917a71cfd8f927b4f50915a6fdff /src/corelib/plugin/qlibrary.cpp | |
parent | 636dbe604596b2860e4f6d9b159fc017dcd2f66b (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.cpp | 6 |
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; } /*! |