Bug 1284384 - Don't crash if TextureClient::Destroy is called between Lock and Unlock. r=sotaro

This commit is contained in:
Nicolas Silva 2016-07-26 12:56:38 +02:00
parent 25aa8617fc
commit b62eea13f0

View File

@ -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;