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
This commit is contained in:
parent
902b32463d
commit
8e6e25c353
1 changed files with 1 additions and 1 deletions
|
@ -488,7 +488,7 @@ void get_current_file(char* buffer, int buffer_len)
|
|||
struct entry* dc = tc.dircache;
|
||||
struct entry* e = &dc[tc.selected_item];
|
||||
snprintf(buffer, buffer_len, "%s/%s", getcwd(NULL,0),
|
||||
e->name);
|
||||
tc.dirlength ? e->name : "");
|
||||
}
|
||||
|
||||
/* Selects a file and update tree context properly */
|
||||
|
|
Loading…
Reference in a new issue