diff options
| author | Björn Stenberg <bjorn@haxx.se> | 2002-06-13 22:38:09 +0000 |
|---|---|---|
| committer | Björn Stenberg <bjorn@haxx.se> | 2002-06-13 22:38:09 +0000 |
| commit | fd99f2210f3df8889a55230fd310b0724bb37857 (patch) | |
| tree | 6544f55b2121fafbee1d88232d998655a04909e4 /apps/tree.c | |
| parent | 3505278aa5d4766bb84a95ded6c10f7811e33ceb (diff) | |
| download | rockbox-fd99f2210f3df8889a55230fd310b0724bb37857.zip rockbox-fd99f2210f3df8889a55230fd310b0724bb37857.tar.gz rockbox-fd99f2210f3df8889a55230fd310b0724bb37857.tar.bz2 rockbox-fd99f2210f3df8889a55230fd310b0724bb37857.tar.xz | |
Don't try to scroll in an empty dir
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@989 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
| -rw-r--r-- | apps/tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c index ec71b5c..7a4a492 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -240,8 +240,9 @@ bool dirbrowse(char *root) return -1; /* root is not a directory */ lcd_puts(0, dircursor, CURSOR_CHAR); - lcd_puts_scroll(LINE_X, LINE_Y+dircursor, - dircacheptr[start+dircursor]->name); + if ( numentries ) + lcd_puts_scroll(LINE_X, LINE_Y+dircursor, + dircacheptr[start+dircursor]->name); lcd_update(); while(1) { @@ -357,8 +358,9 @@ bool dirbrowse(char *root) } lcd_stop_scroll(); - lcd_puts_scroll(LINE_X, LINE_Y+dircursor, - dircacheptr[start+dircursor]->name); + if ( numentries ) + lcd_puts_scroll(LINE_X, LINE_Y+dircursor, + dircacheptr[start+dircursor]->name); lcd_update(); } |