mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1284384 - Don't crash if TextureClient::Destroy is called between Lock and Unlock. r=sotaro
This commit is contained in:
parent
25aa8617fc
commit
b62eea13f0
@ -360,10 +360,11 @@ DeallocateTextureClient(TextureDeallocParams params)
|
||||
|
||||
void TextureClient::Destroy(bool aForceSync)
|
||||
{
|
||||
if (mActor) {
|
||||
if (mActor && !mIsLocked) {
|
||||
mActor->Lock();
|
||||
}
|
||||
|
||||
mBorrowedDrawTarget = nullptr;
|
||||
mReadLock = nullptr;
|
||||
|
||||
CancelWaitFenceHandleOnImageBridge();
|
||||
@ -519,7 +520,9 @@ TextureClient::Unlock()
|
||||
mUpdated = true;
|
||||
}
|
||||
|
||||
mData->Unlock();
|
||||
if (mData) {
|
||||
mData->Unlock();
|
||||
}
|
||||
mIsLocked = false;
|
||||
mOpenMode = OpenMode::OPEN_NONE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user