Author: hdu
Date: Thu Jun 12 08:55:46 2014
New Revision: 1602097

URL: http://svn.apache.org/r1602097
Log:
#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.

Modified:
    openoffice/trunk/main/sw/source/core/attr/format.cxx

Modified: openoffice/trunk/main/sw/source/core/attr/format.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/attr/format.cxx?rev=1602097&r1=1602096&r2=1602097&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/attr/format.cxx (original)
+++ openoffice/trunk/main/sw/source/core/attr/format.cxx Thu Jun 12 08:55:46 
2014
@@ -471,14 +471,16 @@ SfxItemState SwFmt::GetItemState( sal_uI
             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;
     }


Reply via email to