diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-07-29 01:00:11 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-07-29 11:56:00 +0200 |
commit | 154155f588c89d43362abb58bcf91449c78e3ff8 (patch) | |
tree | e72e8040684ab1c51c7ef67d9369a253730da6e4 /src/corelib/io/qresource.cpp | |
parent | 28af6e97e5fe7f844bc85df7af22ce8b7414f5a6 (diff) | |
parent | e24a4976bebd7ca90deac2b40c08900625773a99 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/corelib/io/qresource.cpp
Change-Id: I54917f72444a621bd08aeaa15f5d17415993144d
Diffstat (limited to 'src/corelib/io/qresource.cpp')
-rw-r--r-- | src/corelib/io/qresource.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index e7d739b4dc..b3533397d4 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -940,8 +940,10 @@ bool QResourceRoot::mappingRootSubdir(const QString &path, QString *match) const Q_CORE_EXPORT bool qRegisterResourceData(int version, const unsigned char *tree, const unsigned char *name, const unsigned char *data) { + if (resourceGlobalData.isDestroyed()) + return false; QMutexLocker lock(resourceMutex()); - if (version >= 0x01 && version <= 0x3 && resourceList()) { + if (version >= 0x01 && version <= 0x3) { bool found = false; QResourceRoot res(version, tree, name, data); for(int i = 0; i < resourceList()->size(); ++i) { @@ -967,7 +969,7 @@ Q_CORE_EXPORT bool qUnregisterResourceData(int version, const unsigned char *tre return false; QMutexLocker lock(resourceMutex()); - if (version >= 0x01 && version <= 0x3 && resourceList()) { + if (version >= 0x01 && version <= 0x3) { QResourceRoot res(version, tree, name, data); for(int i = 0; i < resourceList()->size(); ) { if(*resourceList()->at(i) == res) { |