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