зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1061713 - Don't crash release builds if a D3D TextureClient is unlocked without being locked. r=Bas
This commit is contained in:
Родитель
9bfd94ee23
Коммит
1d3f0255c9
|
@ -264,6 +264,9 @@ void
|
|||
TextureClientD3D11::Unlock()
|
||||
{
|
||||
MOZ_ASSERT(mIsLocked, "Unlocked called while the texture is not locked!");
|
||||
if (!mIsLocked) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDrawTarget) {
|
||||
// see the comment on TextureClient::BorrowDrawTarget.
|
||||
|
|
|
@ -631,6 +631,10 @@ void
|
|||
CairoTextureClientD3D9::Unlock()
|
||||
{
|
||||
MOZ_ASSERT(mIsLocked, "Unlocked called while the texture is not locked!");
|
||||
if (!mIsLocked) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDrawTarget) {
|
||||
mDrawTarget->Flush();
|
||||
mDrawTarget = nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче