Check that the generated content URL is non-null (which can happen when it's an

invalid URI).  Bug 244490, r+sr=dbaron
This commit is contained in:
bzbarsky%mit.edu 2004-06-08 01:16:25 +00:00
parent 057d549411
commit f5001de117
2 changed files with 12 additions and 0 deletions

View File

@ -1358,6 +1358,12 @@ nsCSSFrameConstructor::CreateGeneratedFrameFor(nsIPresContext* aPresContex
nsIPresShell *shell = aPresContext->PresShell();
if (eStyleContentType_URL == type) {
if (!data.mContent.mURL) {
// CSS had something specified that couldn't be converted to a URI object
*aFrame = nsnull;
return NS_ERROR_FAILURE;
}
// Create an HTML image content object, and set the SRC.
// XXX Check if it's an image type we can handle...

View File

@ -1358,6 +1358,12 @@ nsCSSFrameConstructor::CreateGeneratedFrameFor(nsIPresContext* aPresContex
nsIPresShell *shell = aPresContext->PresShell();
if (eStyleContentType_URL == type) {
if (!data.mContent.mURL) {
// CSS had something specified that couldn't be converted to a URI object
*aFrame = nsnull;
return NS_ERROR_FAILURE;
}
// Create an HTML image content object, and set the SRC.
// XXX Check if it's an image type we can handle...