From 823b7c7bce1aae5d413c9540c4916c7b1f393300 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 10 Aug 2022 09:10:41 -0700 Subject: 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 --- src/corelib/plugin/qlibrary.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/corelib/plugin/qlibrary.cpp') 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; } /*! -- cgit v1.2.3