Index: Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp |
=================================================================== |
--- Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (revision 95123) |
+++ Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (working copy) |
@@ -116,8 +116,10 @@ |
ImageBuffer::~ImageBuffer() |
{ |
- // This is so that the SkGpuDevice destructor has the correct context. |
- m_context->platformContext()->makeGrContextCurrent(); |
+ if (m_context && m_context->platformContext()) { |
+ // This is so that the SkGpuDevice destructor has the correct context. |
+ m_context->platformContext()->makeGrContextCurrent(); |
+ } |
} |
GraphicsContext* ImageBuffer::context() const |