safety checks to prevent dereferencing null

This commit is contained in:
sspitzer@netscape.com
1999-06-19 21:18:13 +00:00
parent 58d7d53759
commit ae6cfe61f5
12 changed files with 33 additions and 3 deletions

View File

@@ -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;