From 15fb03918806f168f237618ce240d9edead79f1d Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Tue, 3 Sep 2002 22:49:51 +0000 Subject: [PATCH] bug 151983 patch by bernd.mielke@snafu.de r=paper sr=tor ASSERTION: imgLoader::LoadImage -- NULL URI pointer: 'aURI' --- layout/generic/nsImageFrame.cpp | 7 +++++-- layout/html/base/src/nsImageFrame.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 709d0346adc5..4ca876d3ccf5 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -1990,9 +1990,12 @@ nsImageFrame::RealLoadImage(const nsAString& aSpec, nsIPresContext *aPresContext /* get the URI, convert internal-gopher-stuff if needed */ nsCOMPtr uri; GetURI(aSpec, getter_AddRefs(uri)); - if (!uri) + if (!uri) { + if (!realURI) + return NS_ERROR_FAILURE; uri = realURI; - + } + /* set this back to FALSE before we do the real load */ mInitialLoadCompleted = PR_FALSE; diff --git a/layout/html/base/src/nsImageFrame.cpp b/layout/html/base/src/nsImageFrame.cpp index 709d0346adc5..4ca876d3ccf5 100644 --- a/layout/html/base/src/nsImageFrame.cpp +++ b/layout/html/base/src/nsImageFrame.cpp @@ -1990,9 +1990,12 @@ nsImageFrame::RealLoadImage(const nsAString& aSpec, nsIPresContext *aPresContext /* get the URI, convert internal-gopher-stuff if needed */ nsCOMPtr uri; GetURI(aSpec, getter_AddRefs(uri)); - if (!uri) + if (!uri) { + if (!realURI) + return NS_ERROR_FAILURE; uri = realURI; - + } + /* set this back to FALSE before we do the real load */ mInitialLoadCompleted = PR_FALSE;