mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1219501. In imagelib, initialize the number of cores to at least 1 in case of error. r=seth
PR_GetNumberOfProcessors returns -1 in case of error, which is MAXUINT32 when turned into an unsigned int like sNumCores.
This commit is contained in:
parent
c2d043f6d7
commit
362307b1a3
@ -302,7 +302,7 @@ private:
|
||||
DecodePool::Initialize()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
sNumCores = PR_GetNumberOfProcessors();
|
||||
sNumCores = max<int32_t>(PR_GetNumberOfProcessors(), 1);
|
||||
DecodePool::Singleton();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user