diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index 36fbc5879e6..71318af9902 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -389,7 +389,8 @@ ImageFrame::GetDesiredSize(nsIPresContext* aPresContext, // Setup url before starting the image load nsAutoString src, base; - if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute("SRC", src)) { + if ((NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute("SRC", src)) && + (src.Length() > 0)) { mImageLoader.SetURL(src); if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(NS_HTML_BASE_HREF, base)) { diff --git a/mozilla/layout/html/base/src/nsImageFrame.cpp b/mozilla/layout/html/base/src/nsImageFrame.cpp index 36fbc5879e6..71318af9902 100644 --- a/mozilla/layout/html/base/src/nsImageFrame.cpp +++ b/mozilla/layout/html/base/src/nsImageFrame.cpp @@ -389,7 +389,8 @@ ImageFrame::GetDesiredSize(nsIPresContext* aPresContext, // Setup url before starting the image load nsAutoString src, base; - if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute("SRC", src)) { + if ((NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute("SRC", src)) && + (src.Length() > 0)) { mImageLoader.SetURL(src); if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(NS_HTML_BASE_HREF, base)) {