Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Crash in AdvancedCollectionView if elements of different types with a common base class are added to the source #78

Closed
lhak opened this issue Jun 4, 2023 · 1 comment · Fixed by #182

Comments

@lhak
Copy link
Contributor

lhak commented Jun 4, 2023

Using a List<BaseClass> as the source for an AdvancedCollectionView and adding elements of different types (derived from BaseClass) will lead to a crash in the Compare() function as it only uses the type of the first element to be compared.

I modified the code to use the type returned by GetGenericArguments() if the source is a generic type (e.g. List<>). I can submit a PR if wanted.

@niels9001
Copy link
Collaborator

@lhak Thanks for flagging this. Yes please! We checked in the port of the AdvancedCollectionView last week so feel free to put a PR in this repo 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants