diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-04-07 15:31:22 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-04-07 15:31:22 +0000 |
commit | 8e6e25c353e95e6566a7dfabbd2ca31b0b9db09e (patch) | |
tree | cee5a4698071d14ac5395c43a3e04b0ac723393c /apps/tree.c | |
parent | 902b32463d133aede314d8a70e31109f00a01af7 (diff) | |
download | rockbox-8e6e25c353e95e6566a7dfabbd2ca31b0b9db09e.tar.gz rockbox-8e6e25c353e95e6566a7dfabbd2ca31b0b9db09e.zip |
Fix NULL pointer access (crashes the sim on windows) in directories with no displayed entries.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13059 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c index 2b5dba3e18..c3c5ce3239 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -488,7 +488,7 @@ void get_current_file(char* buffer, int buffer_len) | |||
488 | struct entry* dc = tc.dircache; | 488 | struct entry* dc = tc.dircache; |
489 | struct entry* e = &dc[tc.selected_item]; | 489 | struct entry* e = &dc[tc.selected_item]; |
490 | snprintf(buffer, buffer_len, "%s/%s", getcwd(NULL,0), | 490 | snprintf(buffer, buffer_len, "%s/%s", getcwd(NULL,0), |
491 | e->name); | 491 | tc.dirlength ? e->name : ""); |
492 | } | 492 | } |
493 | 493 | ||
494 | /* Selects a file and update tree context properly */ | 494 | /* Selects a file and update tree context properly */ |