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:
@@ -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)) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user