Bug 1180403: P2. Prevent crash when shutting down. r=cpearce

This commit is contained in:
Jean-Yves Avenard 2015-07-08 13:09:55 +10:00
parent 641d20eb39
commit ea747682af

View File

@ -1438,7 +1438,8 @@ void MediaFormatReader::ReleaseMediaResources()
{
// Before freeing a video codec, all video buffers needed to be released
// even from graphics pipeline.
VideoFrameContainer* container = mDecoder->GetVideoFrameContainer();
VideoFrameContainer* container =
mDecoder ? mDecoder->GetVideoFrameContainer() : nullptr;
if (container) {
container->ClearCurrentFrame();
}