Changeset 31139 in webkit


Ignore:
Timestamp:
Mar 18, 2008, 3:30:00 PM (17 years ago)
Author:
eric@webkit.org
Message:

Reviewed by Oliver.

Fix SVGImage crash seen once, and obvious via code inspection.

I was not able to find a test case for this.

  • svg/graphics/SVGImage.cpp: (WebCore::SVGImage::setContainerSize): (WebCore::SVGImage::usesContainerSize): (WebCore::SVGImage::hasRelativeWidth): (WebCore::SVGImage::hasRelativeHeight):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/svg/graphics/SVGImage.cpp

    r30951 r31139  
    7171        return;
    7272
     73    if (!m_frame || !m_frame->document())
     74        return;
    7375    SVGSVGElement* rootElement = static_cast<SVGDocument*>(m_frame->document())->rootElement();
    7476    if (!rootElement)
     
    8082bool SVGImage::usesContainerSize() const
    8183{
     84    if (!m_frame || !m_frame->document())
     85        return false;
    8286    SVGSVGElement* rootElement = static_cast<SVGDocument*>(m_frame->document())->rootElement();
    8387    if (!rootElement)
     
    115119bool SVGImage::hasRelativeWidth() const
    116120{
     121    if (!m_frame || !m_frame->document())
     122        return false;
    117123    SVGSVGElement* rootElement = static_cast<SVGDocument*>(m_frame->document())->rootElement();
    118124    if (!rootElement)
     
    124130bool SVGImage::hasRelativeHeight() const
    125131{
     132    if (!m_frame || !m_frame->document())
     133        return false;
    126134    SVGSVGElement* rootElement = static_cast<SVGDocument*>(m_frame->document())->rootElement();
    127135    if (!rootElement)
Note: See TracChangeset for help on using the changeset viewer.