summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-12 06:39:31 +0100
committerNoel Power <noel.power@suse.com>2013-01-14 11:15:11 +0000
commitab6725a03bd32f1320a53c17de9682eecdbf59c0 (patch)
tree5374f5865218b8e33935b7773c3094837fe53fc5 /basctl
parent2bafa7dacd6ddb9045f5327762334f323f46b1b0 (diff)
fix a bunch of more crashes when setting personas
Change-Id: I6c2c398e074a41c3173bff57bc12496b4c2032b4 Reviewed-on: https://gerrit.libreoffice.org/1659 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx16
-rw-r--r--basctl/source/basicide/layout.cxx5
-rw-r--r--basctl/source/basicide/linenumberwindow.cxx3
3 files changed, 13 insertions, 11 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index e4d7350d232d..ffa93e407a2a 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -666,8 +666,8 @@ void EditorWindow::DataChanged(DataChangedEvent const & rDCEvt)
&& (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
{
Color aColor(GetSettings().GetStyleSettings().GetFieldColor());
- if (aColor
- != rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor())
+ const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+ if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFieldColor())
{
SetBackground(Wallpaper(aColor));
Invalidate();
@@ -675,8 +675,8 @@ void EditorWindow::DataChanged(DataChangedEvent const & rDCEvt)
if (pEditEngine != 0)
{
aColor = GetSettings().GetStyleSettings().GetFieldTextColor();
- if (aColor != rDCEvt.GetOldSettings()->
- GetStyleSettings().GetFieldTextColor())
+ if (!pOldSettings || aColor !=
+ pOldSettings-> GetStyleSettings().GetFieldTextColor())
{
Font aFont(pEditEngine->GetFont());
aFont.SetColor(aColor);
@@ -1166,8 +1166,8 @@ void BreakPointWindow::DataChanged(DataChangedEvent const & rDCEvt)
&& (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
{
Color aColor(GetSettings().GetStyleSettings().GetFieldColor());
- if (aColor
- != rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor())
+ const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+ if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFieldColor())
{
setBackgroundColor(aColor);
Invalidate();
@@ -1690,8 +1690,8 @@ void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt)
&& (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
{
Color aColor(GetSettings().GetStyleSettings().GetFaceColor());
- if (aColor
- != rDCEvt.GetOldSettings()->GetStyleSettings().GetFaceColor())
+ const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+ if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFaceColor())
{
SetBackground(Wallpaper(aColor));
Invalidate();
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);
diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx
index 6e8107521403..79edc16221eb 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -98,7 +98,8 @@ void LineNumberWindow::DataChanged(DataChangedEvent const & rDCEvt)
&& (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
{
Color aColor(GetSettings().GetStyleSettings().GetFieldColor());
- if (aColor != rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor())
+ const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+ if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFieldColor())
{
SetBackground(Wallpaper(aColor));
Invalidate();