Skip to content

PropertyGrid.OnPropertyValueSet: NullReferenceException (version 2) #11768

Closed
@ulfemsoy

Description

@ulfemsoy
          @ulfemsoy there is not enough information for us to diagnose this issue. When you have more information on how you encountered this issue, please reopen this bug or create a new one with the details then we'd be happy to help!

Originally posted by @merriemcgaw in #11495 (comment)

ISSUE:
Please refer to line 2946 in PropertyGrid.cs:
Type propertyType = changedItem.PropertyDescriptor!.PropertyType;
(

Type propertyType = changedItem.PropertyDescriptor!.PropertyType;
)

The value of "changedItem.PropertyDescriptor" can be null, and will raise a NullReferenceException when requesting the property "PropertyType".

"PropertyDescriptor" is null when "changedItem" is a CategoryGridEntry, SingleSelectRootGridEntry or ArrayElementGridEntry.

Please perform a null test (changedItem.PropertyDescriptor is not null) before requesting the property type.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions