Check if parameter is NULL in plugins which only works as viewer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22083 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
221cae987f
commit
37dd46e92f
4 changed files with 4 additions and 0 deletions
|
@ -135,6 +135,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
char *buf;
|
char *buf;
|
||||||
int rc;
|
int rc;
|
||||||
int i;
|
int i;
|
||||||
|
if(!parameter) return PLUGIN_ERROR;
|
||||||
filename = (char *)parameter;
|
filename = (char *)parameter;
|
||||||
|
|
||||||
buf = rb->plugin_get_audio_buffer((size_t *)&buf_size); /* start munching memory */
|
buf = rb->plugin_get_audio_buffer((size_t *)&buf_size); /* start munching memory */
|
||||||
|
|
|
@ -275,6 +275,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
int button;
|
int button;
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
char file[MAX_PATH];
|
char file[MAX_PATH];
|
||||||
|
if(!parameter) return PLUGIN_ERROR;
|
||||||
rb->strcpy(file, (const char *) parameter);
|
rb->strcpy(file, (const char *) parameter);
|
||||||
|
|
||||||
/* determine if it's a file or a directory */
|
/* determine if it's a file or a directory */
|
||||||
|
|
|
@ -149,6 +149,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
int ok;
|
int ok;
|
||||||
const char *filename = parameter;
|
const char *filename = parameter;
|
||||||
char *p;
|
char *p;
|
||||||
|
if(!parameter) return PLUGIN_ERROR;
|
||||||
|
|
||||||
DEBUGF("%s - %s\n", (char *)parameter, &filename[rb->strlen(filename)-4]);
|
DEBUGF("%s - %s\n", (char *)parameter, &filename[rb->strlen(filename)-4]);
|
||||||
/* Check the extension. We only allow .m3u files. */
|
/* Check the extension. We only allow .m3u files. */
|
||||||
|
|
|
@ -180,6 +180,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
int rc;
|
int rc;
|
||||||
|
if(!parameter) return PLUGIN_ERROR;
|
||||||
|
|
||||||
filename = (char *)parameter;
|
filename = (char *)parameter;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue