I have a WinForm
app that has a ListView
in it, with a DoubleClick
event handler assigned to it.
Theoretically , only items are "clickable" , so it should be impossible to enter the event handler with no selected items, and so it is for 99% of cases.
However, every once in a while, I catch an exception of InvalidAgrument
as my handler try to access list_view.SelectedItems[0]
, and there I see that it does actually empty.
When I try to reproduce, it takes an aggressive clicking session to do it. But it's done, I can sometimes see the cursor in the middle of a valid entity , which makes me suspect it might be some racing condition.