Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1739
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/39/1739/1
Personas: Fix one more potential crash.
Change-Id: Ib7aca26c34aa8484e8c71873805ca8e8812526a7
---
M vcl/source/control/ctrl.cxx
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index e89e5c9..bfa45d4 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -444,16 +444,17 @@
(rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- AllSettings aSettings = GetSettings();
- StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- sal_uLong nOldOptions = rDCEvt.GetOldSettings()->GetStyleSettings().GetOptions();
- sal_uLong nNewOptions = aStyleSettings.GetOptions();
+ const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
- if ( !(nNewOptions & STYLE_OPTION_MONO) && ( nOldOptions & STYLE_OPTION_MONO ) )
+ AllSettings aSettings = GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ sal_uLong nNewOptions = aStyleSettings.GetOptions();
+
+ if ( pOldSettings && !(nNewOptions & STYLE_OPTION_MONO) && (
pOldSettings->GetStyleSettings().GetOptions() & STYLE_OPTION_MONO ) )
{
nNewOptions |= STYLE_OPTION_MONO;
aStyleSettings.SetOptions( nNewOptions );
- aStyleSettings.SetMonoColor(
rDCEvt.GetOldSettings()->GetStyleSettings().GetMonoColor() );
+ aStyleSettings.SetMonoColor( pOldSettings->GetStyleSettings().GetMonoColor() );
aSettings.SetStyleSettings( aStyleSettings );
SetSettings( aSettings );
}
--
To view, visit https://gerrit.libreoffice.org/1739
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7aca26c34aa8484e8c71873805ca8e8812526a7
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Jan Holesovsky <kendy@suse.cz>
Context
- [PATCH] Change in core[libreoffice-4-0]: Personas: Fix one more potential crash. · Jan Holesovsky (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.