summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 03cc74c)
raw | patch | inline | side by side (parent: 03cc74c)
author | Kalle Wallin <kaw@linux.se> | |
Sun, 19 Dec 2004 13:04:18 +0000 (13:04 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Sun, 19 Dec 2004 13:04:18 +0000 (13:04 +0000) |
resulted in an infinite loop
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2806 09075e82-0dd4-0310-85a5-a0d7c8717e4f
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2806 09075e82-0dd4-0310-85a5-a0d7c8717e4f
src/list_window.c | patch | blob | history |
diff --git a/src/list_window.c b/src/list_window.c
index b541ac708f186602d72518917bbe3861fa612b59..c6f5375a12a6c159864fc09b7b64b6d4d7ad6a74 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
}
if( wrap )
{
+ if ( i==0 ) /* empty list */
+ return 1;
i=0; /* first item */
screen_bell();
}
int i = lw->selected-1;
char *label;
+ if ( rows == 0 )
+ return 1;
+
while( wrap || i==lw->selected-1 )
{
while( i>=0 && (label=(callback) (i,&h,callback_data)) )