mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
null check.
This commit is contained in:
@@ -114,8 +114,8 @@ namespace GARbro.GUI
|
|||||||
// for each item in the range [start, end]
|
// for each item in the range [start, end]
|
||||||
foreach (var item in Items.Cast<object>().Skip (start).Take (end-start+1))
|
foreach (var item in Items.Cast<object>().Skip (start).Take (end-start+1))
|
||||||
{
|
{
|
||||||
var lvi = (ListViewItem)ItemContainerGenerator.ContainerFromItem (item);
|
var lvi = ItemContainerGenerator.ContainerFromItem (item) as ListViewItem;
|
||||||
if (!lvi.IsSelected)
|
if (null != lvi && !lvi.IsSelected)
|
||||||
lvi.IsSelected = true;
|
lvi.IsSelected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user