summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-11-09 23:21:28 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-11-09 23:21:28 +0000
commit6170e8837b4cc8a6d33b1b3b095330b9984eaa9c (patch)
treee74a3b926fa5874c3acc074823121c67e0a4c980 /apps
parent6e992abf36b1719cba18c9f4d519a02b187c8bca (diff)
downloadrockbox-6170e8837b4cc8a6d33b1b3b095330b9984eaa9c.tar.gz
rockbox-6170e8837b4cc8a6d33b1b3b095330b9984eaa9c.zip
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')
-rw-r--r--apps/plugins/jpeg.c4
1 files changed, 4 insertions, 0 deletions
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)
2839 long graysize; /* helper */ 2839 long graysize; /* helper */
2840#endif 2840#endif
2841 2841
2842 if(!parameter) return PLUGIN_ERROR;
2843
2842 rb->strcpy(np_file, parameter); 2844 rb->strcpy(np_file, parameter);
2843 get_pic_list(); 2845 get_pic_list();
2844 2846
2847 if(!entries) return PLUGIN_ERROR;
2848
2845#if (PLUGIN_BUFFER_SIZE >= MIN_MEM) && !defined(SIMULATOR) 2849#if (PLUGIN_BUFFER_SIZE >= MIN_MEM) && !defined(SIMULATOR)
2846 if(rb->audio_status()) 2850 if(rb->audio_status())
2847 { 2851 {