mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167557 - Crash when a null surface is passed to SurfaceCache::Insert. r=dholbert
This commit is contained in:
parent
76347c9f12
commit
8408489fa0
@ -1023,6 +1023,11 @@ SurfaceCache::Insert(imgFrame* aSurface,
|
||||
return InsertOutcome::FAILURE;
|
||||
}
|
||||
|
||||
// Refuse null surfaces.
|
||||
if (!aSurface) {
|
||||
MOZ_CRASH("Don't pass null surfaces to SurfaceCache::Insert");
|
||||
}
|
||||
|
||||
MutexAutoLock lock(sInstance->GetMutex());
|
||||
Cost cost = ComputeCost(aSurface->GetSize(), aSurface->GetBytesPerPixel());
|
||||
return sInstance->Insert(aSurface, cost, aImageKey, aSurfaceKey, aLifetime);
|
||||
|
Loading…
Reference in New Issue
Block a user