Changeset 94982 in webkit


Ignore:
Timestamp:
Sep 12, 2011 3:19:37 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[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 <twiz@chromium.org> on 2011-09-12
Reviewed by Stephen White.

  • platform/graphics/skia/ImageBufferSkia.cpp:

(WebCore::ImageBuffer::~ImageBuffer):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r94981 r94982  
     12011-09-12  Jeff Timanus  <twiz@chromium.org>
     2
     3        [chromium]  Prevent a crash when tearing down an ImageBuffer that was not successfully initialized.
     4        https://bugs.webkit.org/show_bug.cgi?id=67944
     5
     6        Reviewed by Stephen White.
     7       
     8        * platform/graphics/skia/ImageBufferSkia.cpp:
     9        (WebCore::ImageBuffer::~ImageBuffer):
     10
    1112011-09-12  Michael Saboff  <msaboff@apple.com>
    212
  • trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp

    r94332 r94982  
    117117ImageBuffer::~ImageBuffer()
    118118{
    119     // This is so that the SkGpuDevice destructor has the correct context.
    120     m_context->platformContext()->makeGrContextCurrent();
     119    if (m_context && m_context->platformContext()) {
     120        // This is so that the SkGpuDevice destructor has the correct context.
     121        m_context->platformContext()->makeGrContextCurrent();
     122    }
    121123}
    122124
Note: See TracChangeset for help on using the changeset viewer.