diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-12 05:29:25 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-03-04 17:35:53 +0100 |
commit | a1beac27864650c71d38e819a0da9f971f5ff06d (patch) | |
tree | 47261850344cd5f1c78d0ffaa1fb32eabd78b5f5 /vcl | |
parent | 3803d8f135b573ccdd755cc406d85751595aacd1 (diff) |
fix crash with new personas when notifying windows
Change-Id: I41e4c747c4662fb066746c0ca87d17ea6742080e
Diffstat (limited to 'vcl')
-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 a13e4fa84ffe..1b556febc181 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -739,7 +739,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() ) { |