diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-12 05:29:25 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-12 05:34:09 +0100 |
commit | ab3c544633612a2079a918bf05bb59a21e17f208 (patch) | |
tree | 0be1213b95cbe5418426e26cfa43370cb5936cbf /vcl/source | |
parent | f7515957e09bba964530123eebf500588e2e2a4d (diff) |
fix crash with new personas when notifying windows
Change-Id: I41e4c747c4662fb066746c0ca87d17ea6742080e
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/split.cxx | 6 |
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() ) { |