Bug 892285 - Only unlock gralloc surfaces if they were locked, r=bas

This commit is contained in:
Michael Wu 2013-07-12 01:52:37 -04:00
parent 1c6a972598
commit a089db32c4

View File

@ -123,10 +123,11 @@ DeprecatedTextureClientShmem::GetSurface()
void
DeprecatedTextureClientShmem::Unlock()
{
mSurface = nullptr;
if (mSurface) {
mSurface = nullptr;
ShadowLayerForwarder::CloseDescriptor(mDescriptor);
}
mSurfaceAsImage = nullptr;
ShadowLayerForwarder::CloseDescriptor(mDescriptor);
}
gfxImageSurface*