summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-12 05:29:25 +0100
committerNoel Power <noel.power@suse.com>2013-01-14 11:01:46 +0000
commit2bafa7dacd6ddb9045f5327762334f323f46b1b0 (patch)
tree5d0f61adcc455ce80bac857f178d966ea0bea136 /vcl
parentc246579a807946e649ec009eba320b69ff56c03e (diff)
fix crash with new personas when notifying windows
Change-Id: I41e4c747c4662fb066746c0ca87d17ea6742080e Reviewed-on: https://gerrit.libreoffice.org/1658 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/split.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 4877004ae9b6..9e79c8fa1b78 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -729,7 +729,11 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
Window::DataChanged( rDCEvt );
if( rDCEvt.GetType() == DATACHANGED_SETTINGS )
{
- Color oldFaceColor = ((AllSettings *) rDCEvt.GetData())->GetStyleSettings().GetFaceColor();
+ AllSettings* pOldSettings = static_cast<AllSettings*>(rDCEvt.GetData());
+ if(!pOldSettings)
+ return;
+
+ Color oldFaceColor = pOldSettings->GetStyleSettings().GetFaceColor();
Color newFaceColor = Application::GetSettings().GetStyleSettings().GetFaceColor();
if( oldFaceColor.IsDark() != newFaceColor.IsDark() )
{