summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd5dd6f)
raw | patch | inline | side by side (parent: fd5dd6f)
author | Max Kellermann <max@duempel.org> | |
Sun, 13 Sep 2009 07:58:33 +0000 (09:58 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 13 Sep 2009 07:58:33 +0000 (09:58 +0200) |
browser_get_selected() should not return an item when multiple items
are selected (range selection).
are selected (range selection).
src/screen_browser.c | patch | blob | history |
diff --git a/src/screen_browser.c b/src/screen_browser.c
index e1b2e5fb6cf2688260ec95893d31615a564b6872..13bad9bf5dc57951cc3882df923a8c9995bd764e 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
browser_get_selected(const struct screen_browser *browser)
{
if (browser->filelist == NULL ||
+ browser->lw->selected_start < browser->lw->selected_end ||
browser->lw->selected >= filelist_length(browser->filelist))
return NULL;
struct filelist_entry *entry = browser_get_selected(browser);
mpd_InfoEntity *entity;
- if( entry==NULL || browser->lw->selected_start < browser->lw->selected_end)
+ if (entry == NULL)
return false;
entity = entry->entity;