summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHristo Kovachev <bger@rockbox.org>2006-05-18 11:05:47 +0000
committerHristo Kovachev <bger@rockbox.org>2006-05-18 11:05:47 +0000
commitc138d004dc3e89b695fcd36156974533a8076417 (patch)
treeeb974ddd3c1db03c81fb18b686569d22b0429237
parent06605a92c099d6958794b409034d87550abc6554 (diff)
downloadrockbox-c138d004dc3e89b695fcd36156974533a8076417.tar.gz
rockbox-c138d004dc3e89b695fcd36156974533a8076417.tar.bz2
rockbox-c138d004dc3e89b695fcd36156974533a8076417.zip
Fix jpeg viewer crashing in directories with files without extension.
Thanks go to Bill Janssen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9954 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/jpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index bf1b110bd1..e44e243d41 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -1970,6 +1970,8 @@ static int compare(const void* p1, const void* p2)
bool jpg_ext(const char ext[])
{
+ if(!ext)
+ return false;
if(!rb->strcasecmp(ext,".jpg") ||
!rb->strcasecmp(ext,".jpe") ||
!rb->strcasecmp(ext,".jpeg"))