summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2014-06-12 08:55:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-06-18 14:10:22 +0100
commit6de99d2d046a4fefbd9c264b8b19e3283099ed81 (patch)
treeafb94a9555a4ab66f44fbaafc939e11feae36144
parentae2cccdd2c45ccec1d6dc6764698f105ffa72d2f (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.cxx6
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;
}