Avoid crashing when no link handler is involved

git-svn-id: svn://10.0.0.236/trunk@4732 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp
1998-06-30 20:22:27 +00:00
parent 381be9a9e1
commit d6205b6157
3 changed files with 6 additions and 3 deletions

View File

@@ -417,7 +417,8 @@ static PRBool SelectorMatches(nsIPresContext* aPresContext,
// test link state
nsILinkHandler* linkHandler;
if (NS_OK == aPresContext->GetLinkHandler(&linkHandler)) {
if ((NS_OK == aPresContext->GetLinkHandler(&linkHandler)) &&
(nsnull != linkHandler)) {
nsAutoString base, href; // XXX base??
htmlContent->GetAttribute("href", href);