diff options
| author | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-11-09 23:21:28 +0000 |
|---|---|---|
| committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-11-09 23:21:28 +0000 |
| commit | 6170e8837b4cc8a6d33b1b3b095330b9984eaa9c (patch) | |
| tree | e74a3b926fa5874c3acc074823121c67e0a4c980 /apps/plugins | |
| parent | 6e992abf36b1719cba18c9f4d519a02b187c8bca (diff) | |
| download | rockbox-6170e8837b4cc8a6d33b1b3b095330b9984eaa9c.zip rockbox-6170e8837b4cc8a6d33b1b3b095330b9984eaa9c.tar.gz rockbox-6170e8837b4cc8a6d33b1b3b095330b9984eaa9c.tar.bz2 rockbox-6170e8837b4cc8a6d33b1b3b095330b9984eaa9c.tar.xz | |
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
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/jpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 396617f..81b5098 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()) { |