Title: [95125] branches/chromium/874/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
- Revision
- 95125
- Author
- [email protected]
- Date
- 2011-09-14 14:39:43 -0700 (Wed, 14 Sep 2011)
Log Message
Merge 94982 - [chromium] Prevent a crash when tearing down an ImageBuffer that was not successfully initialized.
https://bugs.webkit.org/show_bug.cgi?id=67944
Patch by Jeff Timanus <[email protected]> on 2011-09-12
Reviewed by Stephen White.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::~ImageBuffer):
[email protected]
Review URL: http://codereview.chromium.org/7888057
Modified Paths
Diff
Modified: branches/chromium/874/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (95124 => 95125)
--- branches/chromium/874/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2011-09-14 21:39:34 UTC (rev 95124)
+++ branches/chromium/874/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2011-09-14 21:39:43 UTC (rev 95125)
@@ -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
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes