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
This commit is contained in:
Peter D'Hoye 2006-11-09 23:21:28 +00:00
parent 6e992abf36
commit 6170e8837b

View file

@ -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())
{