Index: Source/core/html/HTMLCanvasElement.cpp |
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
index 6dc6f92d1556336a741cd0d237d79c7bb972ab68..fc74f13b75eaf385ef5ef2d985b8cbc77280ab6c 100644 |
--- a/Source/core/html/HTMLCanvasElement.cpp |
+++ b/Source/core/html/HTMLCanvasElement.cpp |
@@ -692,7 +692,7 @@ PassOwnPtr<ImageBufferSurface> HTMLCanvasElement::createImageBufferSurface(const |
void HTMLCanvasElement::createImageBuffer() |
{ |
createImageBufferInternal(nullptr); |
- if (m_didFailToCreateImageBuffer && m_context->is2d()) |
+ if (m_didFailToCreateImageBuffer && m_context->is2d() && !size().isEmpty()) |
m_context->loseContext(CanvasRenderingContext::SyntheticLostContext); |
} |