Bug 1375461: Ensure mSyncObject isn't null before attempting to sync with it. r=mattwoodrow

MozReview-Commit-ID: HuflJDLhlRl

--HG--
extra : rebase_source : 8da9af58bcda88f63162b094cc1d789038848f1a
This commit is contained in:
Bas Schouten 2017-07-10 07:49:34 +00:00
parent 9473e447e1
commit be92d4e45b

View File

@ -954,7 +954,10 @@ D3D11DXVA2Manager::CopyToImage(IMFSample* aVideoSample,
hr = mTransform->Output(&sample);
}
}
if (!mutex && mDevice != DeviceManagerDx::Get()->GetCompositorDevice()) {
if (!mutex && mDevice != DeviceManagerDx::Get()->GetCompositorDevice() && mSyncObject) {
// It appears some race-condition may allow us to arrive here even when mSyncObject
// is null. It's better to avoid that crash.
client->SyncWithObject(mSyncObject);
mSyncObject->FinalizeFrame();
}