fix crash in Invoke() when no items are selected and a selection change message is set
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15620 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d69c048704
commit
46128d7e26
@ -836,9 +836,11 @@ BListView::Invoke(BMessage *message)
|
||||
if (fListType == B_SINGLE_SELECTION_LIST)
|
||||
clone.AddInt32("index", fFirstSelected);
|
||||
else {
|
||||
for (int32 i = fFirstSelected; i <= fLastSelected; i++) {
|
||||
if (ItemAt(i)->IsSelected())
|
||||
clone.AddInt32("index", i);
|
||||
if (fFirstSelected >= 0) {
|
||||
for (int32 i = fFirstSelected; i <= fLastSelected; i++) {
|
||||
if (ItemAt(i)->IsSelected())
|
||||
clone.AddInt32("index", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user