[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source
Herbert Dürr
hdu at apache.org
Thu Jun 12 03:07:34 PDT 2014
sw/source/core/attr/format.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 7d096ff2e25e422f55c821ecce99cecac6ee4b95
Author: Herbert Dürr <hdu at apache.org>
Date: Thu Jun 12 08:55:46 2014 +0000
#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.
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 92f81e4..2a8e6a7 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -471,14 +471,16 @@ SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent, con
static SvxBrushItem aSvxBrushItem(RES_BACKGROUND);
aSvxBrushItem = getSvxBrushItemFromSourceSet(aSet, RES_BACKGROUND, 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;
}
More information about the Libreoffice-commits
mailing list