Baseflow / Baseflow/XF-Material-Library

MaterialCheckboxGroup NullReferenceException

Open
#417 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
633
Forks
150
PR merge metrics
No merged PRs in 30d

Description

## 🐛 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.