Bug 1016131 - Fix crash in nsCSSStyleSheet::IsApplicable when dom.forms.number is disabled. r=dholbert

This commit is contained in:
Jonathan Watt 2014-05-28 14:28:34 +01:00
parent 8e904d450a
commit 58eea22a12

View File

@ -140,7 +140,11 @@ SVGDocument::EnsureNonSVGUserAgentStyleSheetsLoaded()
}
}
EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::NumberControlSheet());
nsCSSStyleSheet* sheet = nsLayoutStylesheetCache::NumberControlSheet();
if (sheet) {
// number-control.css can be behind a pref
EnsureOnDemandBuiltInUASheet(sheet);
}
EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::FormsSheet());
EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::HTMLSheet());
EnsureOnDemandBuiltInUASheet(nsLayoutStylesheetCache::UASheet());