mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 08:48:07 +00:00
Fix for bug #13780. Added NULL pointer check to PreferenceChanged()
This commit is contained in:
parent
987374301c
commit
f521d3ac1b
@ -244,13 +244,15 @@ nsPresContext::PreferenceChanged(const char* aPrefName)
|
||||
// Initialize our state from the user preferences
|
||||
GetUserPreferences();
|
||||
|
||||
if (mShell) {
|
||||
// Have the root frame's style context remap its style based on the
|
||||
// user preferences
|
||||
nsIFrame* rootFrame;
|
||||
nsIStyleContext* rootStyleContext;
|
||||
|
||||
mShell->GetRootFrame(&rootFrame);
|
||||
if (nsnull != rootFrame) {
|
||||
if (rootFrame) {
|
||||
nsIStyleContext* rootStyleContext;
|
||||
|
||||
rootFrame->GetStyleContext(&rootStyleContext);
|
||||
rootStyleContext->RemapStyle(this);
|
||||
NS_RELEASE(rootStyleContext);
|
||||
@ -261,6 +263,7 @@ nsPresContext::PreferenceChanged(const char* aPrefName)
|
||||
// then we only need to repaint...
|
||||
mShell->StyleChangeReflow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -244,13 +244,15 @@ nsPresContext::PreferenceChanged(const char* aPrefName)
|
||||
// Initialize our state from the user preferences
|
||||
GetUserPreferences();
|
||||
|
||||
if (mShell) {
|
||||
// Have the root frame's style context remap its style based on the
|
||||
// user preferences
|
||||
nsIFrame* rootFrame;
|
||||
nsIStyleContext* rootStyleContext;
|
||||
|
||||
mShell->GetRootFrame(&rootFrame);
|
||||
if (nsnull != rootFrame) {
|
||||
if (rootFrame) {
|
||||
nsIStyleContext* rootStyleContext;
|
||||
|
||||
rootFrame->GetStyleContext(&rootStyleContext);
|
||||
rootStyleContext->RemapStyle(this);
|
||||
NS_RELEASE(rootStyleContext);
|
||||
@ -261,6 +263,7 @@ nsPresContext::PreferenceChanged(const char* aPrefName)
|
||||
// then we only need to repaint...
|
||||
mShell->StyleChangeReflow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user