Bug 570625, part -1: ThebesLayerBuffer::SetBuffer needs to hold its ref to the old buffer. r=roc

This commit is contained in:
Chris Jones 2010-09-14 00:23:08 -05:00
parent fd4469ce23
commit 3f1c9a5b8a

View File

@ -160,11 +160,11 @@ protected:
SetBuffer(gfxASurface* aBuffer,
const nsIntRect& aBufferRect, const nsIntPoint& aBufferRotation)
{
gfxASurface* tmp = mBuffer;
nsRefPtr<gfxASurface> tmp = mBuffer.forget();
mBuffer = aBuffer;
mBufferRect = aBufferRect;
mBufferRotation = aBufferRotation;
return tmp;
return tmp.forget();
}
private: