Add missing lock in QFactoryLoader
libraryList is modified in a code section that was not yet properly locked.
This was overlooked by 7ca66b1e66.
Task-number: QTBUG-42855
Change-Id: I028ad21a7df314133931f860ad49453bb2db9da0
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
parent
43ae627f40
commit
5f7b771c4f
|
|
@ -296,6 +296,7 @@ void QFactoryLoader::update()
|
|||
}
|
||||
if (keyUsageCount || keys.isEmpty()) {
|
||||
library->setLoadHints(QLibrary::PreventUnloadHint); // once loaded, don't unload
|
||||
QMutexLocker locker(&d->mutex);
|
||||
d->libraryList += library;
|
||||
} else {
|
||||
library->release();
|
||||
|
|
|
|||
Loading…
Reference in New Issue