mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 22:42:05 +02:00
Merge pull request #14343 from ElderOrb/FB19514
FB19514 - Interface crashes on attempt to apply new animation url via…
This commit is contained in:
commit
6c90d7ed11
2 changed files with 9 additions and 4 deletions
|
@ -70,10 +70,15 @@ uint32_t ResourceCacheSharedItems::getPendingRequestsCount() const {
|
|||
|
||||
QList<QSharedPointer<Resource>> ResourceCacheSharedItems::getLoadingRequests() const {
|
||||
QList<QSharedPointer<Resource>> result;
|
||||
{
|
||||
Lock lock(_mutex);
|
||||
result = _loadingRequests;
|
||||
Lock lock(_mutex);
|
||||
|
||||
foreach(QWeakPointer<Resource> resource, _loadingRequests) {
|
||||
auto locked = resource.lock();
|
||||
if (locked) {
|
||||
result.append(locked);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ private:
|
|||
|
||||
mutable Mutex _mutex;
|
||||
QList<QWeakPointer<Resource>> _pendingRequests;
|
||||
QList<QSharedPointer<Resource>> _loadingRequests;
|
||||
QList<QWeakPointer<Resource>> _loadingRequests;
|
||||
const uint32_t DEFAULT_REQUEST_LIMIT = 10;
|
||||
uint32_t _requestLimit { DEFAULT_REQUEST_LIMIT };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue