Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp

Issue 7888057: Merge 94982 - [chromium] Prevent a crash when tearing down an ImageBuffer that was not successfu... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698