Skip to content

Commit 5d1363e

Browse files
authored
Add left-out nullptr to example code in SetValue
As suggested, SetValue's example code should be checked against nullptr: if( property ) needs to be if( property != nullptr )
1 parent dc88250 commit 5d1363e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/mfc/reference/cmfcpropertygridproperty-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ Example:
15181518
void SetPropBarValue( UINT propId, const DWORD& barPropDwordValue )
15191519
{
15201520
auto property = propertiesGridCtrlList.FindItemByData( propId );
1521-
if( property )
1521+
if( property != nullptr )
15221522
{
15231523
property->SetValue( static_cast< _variant_t >( barPropDwordValue == 1 ) ); // sets property bar value to true or false depending on dword value
15241524
}

0 commit comments

Comments
 (0)