diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 203d9589ac2d..2ebe3e646e40 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -3724,6 +3724,9 @@ nsDocument::AddStyleSheetToStyleSets(nsIStyleSheet* aSheet) #define DO_STYLESHEET_NOTIFICATION(createFunc, initMethod, concreteInterface, type) \ do { \ + if (!HasStyleSheetChangeEventsEnabled()) { \ + break; \ + } \ nsCOMPtr event; \ nsresult rv = createFunc(getter_AddRefs(event), this, \ mPresShell ? \