From 6170e8837b4cc8a6d33b1b3b095330b9984eaa9c Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Thu, 9 Nov 2006 23:21:28 +0000 Subject: Quit the jpeg viewer gracefully if started without arguments or with a wrong file in a directory with no supported filetypes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11486 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/jpeg.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/plugins/jpeg.c') diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 396617f40b..81b5098a2a 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c @@ -2839,9 +2839,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) long graysize; /* helper */ #endif + if(!parameter) return PLUGIN_ERROR; + rb->strcpy(np_file, parameter); get_pic_list(); + if(!entries) return PLUGIN_ERROR; + #if (PLUGIN_BUFFER_SIZE >= MIN_MEM) && !defined(SIMULATOR) if(rb->audio_status()) { -- cgit v1.2.3