Added check for SRC being an empty string

git-svn-id: svn://10.0.0.236/trunk@14598 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1998-11-13 18:38:16 +00:00
parent 0aa5613660
commit 98bfa2a63c
2 changed files with 4 additions and 2 deletions

View File

@@ -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)) {

View File

@@ -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)) {