summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/layout.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-12 06:39:31 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-12 06:42:47 +0100
commit200e0c8d88fc68defebbd7b79fd4d1d2e1b9c6bd (patch)
tree50f0808edeabdf3ac679d96a0047cf7a529f2d95 /basctl/source/basicide/layout.cxx
parent13d50871e328a640a5baa283cf669407738e8cdd (diff)
fix a bunch of more crashes when setting personas
Change-Id: I6c2c398e074a41c3173bff57bc12496b4c2032b4
Diffstat (limited to 'basctl/source/basicide/layout.cxx')
-rw-r--r--basctl/source/basicide/layout.cxx5
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);