Commit 8a4f6fc4 by John Bauman Committed by Nicolas Capens

Fix crashes in SwiftShader with PPAPI

SwiftShader had been crashing on certain websites with Flash. This change prevents that.
parent 19bac1e0
...@@ -727,11 +727,12 @@ namespace sw ...@@ -727,11 +727,12 @@ namespace sw
Surface::~Surface() Surface::~Surface()
{ {
if(!hasParent)
{
// Synchronize so we can deallocate the buffers below // Synchronize so we can deallocate the buffers below
resource->lock(DESTRUCT); resource->lock(DESTRUCT);
resource->unlock(); resource->unlock();
if(!hasParent)
{
resource->destruct(); resource->destruct();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment