diff options
Diffstat (limited to 'basctl/source/basicide/layout.cxx')
-rw-r--r-- | basctl/source/basicide/layout.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index e679a4fab431..344345fd3baf 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -135,13 +135,14 @@ void Layout::DataChanged (DataChangedEvent const& rDCEvt) { bool bInvalidate = false; Color aColor = GetSettings().GetStyleSettings().GetWindowColor(); - if (aColor != rDCEvt.GetOldSettings()->GetStyleSettings().GetWindowColor()) + const AllSettings* pOldSettings = rDCEvt.GetOldSettings(); + if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetWindowColor()) { SetBackground(Wallpaper(aColor)); bInvalidate = true; } aColor = GetSettings().GetStyleSettings().GetWindowTextColor(); - if (aColor != rDCEvt.GetOldSettings()->GetStyleSettings().GetWindowTextColor()) + if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetWindowTextColor()) { Font aFont(GetFont()); aFont.SetColor(aColor); |