XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

MaterialCheckboxGroup NullReferenceException

Open zillemarco opened this issue 4 years ago • 0 comments

🐛 Bug Report

MaterialCheckboxGroup throws a NullReferenceException when both SelectedIndices and Choices and bound to the respective binding properties and Choices is and empty list.

This is due to https://github.com/Baseflow/XF-Material-Library/blob/20bc606a7bc8b9a6ddceb83fc7a3effd4743c1f6/XF.Material/UI/Internals/BaseMaterialSelectionControlGroup.cs#L145 and https://github.com/Baseflow/XF-Material-Library/blob/20bc606a7bc8b9a6ddceb83fc7a3effd4743c1f6/XF.Material/UI/MaterialCheckboxGroup.xaml.cs#L130

the foreach at MaterialCheckboxGroup.xaml.cs#L130 assumes Models to be valid, but due to BaseMaterialSelectionControlGroup.cs#L145 it's not.

zillemarco avatar Feb 13 '21 10:02 zillemarco