diff options
author | Herbert Dürr <hdu@apache.org> | 2014-06-12 08:55:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-18 14:10:22 +0100 |
commit | 6de99d2d046a4fefbd9c264b8b19e3283099ed81 (patch) | |
tree | afb94a9555a4ab66f44fbaafc939e11feae36144 | |
parent | ae2cccdd2c45ccec1d6dc6764698f105ffa72d2f (diff) |
Resolves: #i125071# check SwFmt::GetItemState()'s ppItem parameter...
for NULL before assigning something into it. The ppItem default value is NULL
so it is allowed. The method should be prepared to handle that.
(cherry picked from commit 7d096ff2e25e422f55c821ecce99cecac6ee4b95)
Conflicts:
sw/source/core/attr/format.cxx
Change-Id: I5b4bc84cf10f6f2955af21ae80a43e985f0555fb
-rw-r--r-- | sw/source/core/attr/format.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 599d62d22b83..a99d7360bae8 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -423,14 +423,16 @@ SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, bool bSrchInParent, const S static SvxBrushItem aSvxBrushItem(RES_BACKGROUND); aSvxBrushItem = sw::getSvxBrushItemFromSourceSet(aSet, bSrchInParent); - *ppItem = &aSvxBrushItem; + if( ppItem ) + *ppItem = &aSvxBrushItem; return SFX_ITEM_SET; } // if not, reset pointer and return SFX_ITEM_DEFAULT to signal that // the item is not set - *ppItem = 0; + if( ppItem ) + *ppItem = NULL; return SFX_ITEM_DEFAULT; } |