diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-12 06:39:31 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-03-04 17:36:51 +0100 |
commit | cd876c68da13d688bd867b3bc3613eb4130532d3 (patch) | |
tree | 531758cc58ac4086d7189d29a659eb83b0de5b23 /basctl | |
parent | a1beac27864650c71d38e819a0da9f971f5ff06d (diff) |
fix a bunch of more crashes when setting personas
Conflicts:
basctl/source/basicide/layout.cxx
Change-Id: I6c2c398e074a41c3173bff57bc12496b4c2032b4
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/linenumberwindow.cxx | 3 |
2 files changed, 10 insertions, 9 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index ebb67bfb641c..698ee0448481 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -663,8 +663,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(); @@ -672,8 +672,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); @@ -1164,8 +1164,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(); @@ -1720,8 +1720,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/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index 052e2a3f4f75..47ea752a5e5e 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -94,7 +94,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(); |