safety checks to prevent dereferencing null
This commit is contained in:
@@ -553,6 +553,8 @@ PRInt32 HTMLStyleSheetImpl::RulesMatching(nsIPresContext* aPresContext,
|
||||
|
||||
PRInt32 matchCount = 0;
|
||||
|
||||
if (!aPresContext || !aContent || !aResults) return matchCount;
|
||||
|
||||
nsIStyledContent* styledContent;
|
||||
if (NS_SUCCEEDED(aContent->QueryInterface(nsIStyledContent::GetIID(), (void**)&styledContent))) {
|
||||
PRInt32 nameSpace;
|
||||
|
||||
Reference in New Issue
Block a user