[PATCH] Change in core[libreoffice-4-0]: fix crash with new personas when notifying windows

Markus Mohrhard (via Code Review) gerrit at gerrit.libreoffice.org
Fri Jan 11 20:42:36 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1658

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/58/1658/1

fix crash with new personas when notifying windows

Change-Id: I41e4c747c4662fb066746c0ca87d17ea6742080e
---
M vcl/source/window/split.cxx
1 file changed, 5 insertions(+), 1 deletion(-)



diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 4877004..9e79c8f 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -729,7 +729,11 @@
     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() )
         {

-- 
To view, visit https://gerrit.libreoffice.org/1658
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41e4c747c4662fb066746c0ca87d17ea6742080e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Markus Mohrhard <markus.mohrhard at googlemail.com>



More information about the LibreOffice mailing list