From c138d004dc3e89b695fcd36156974533a8076417 Mon Sep 17 00:00:00 2001 From: Hristo Kovachev Date: Thu, 18 May 2006 11:05:47 +0000 Subject: 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 --- apps/plugins/jpeg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps') 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")) -- cgit v1.2.3