Commit 3db5293c authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* opengl: remove NULL from string arrays

* configuration.c: don't crash on NULL values
parent 5563e0d6
......@@ -99,9 +99,9 @@ static int SendEvents( vlc_object_t *, char const *,
"Allows you to select different visual effects.")
static char *ppsz_effects[] = {
"none", "cube", "transparent-cube", NULL };
"none", "cube", "transparent-cube" };
static char *ppsz_effects_text[] = {
N_("None"), N_("Cube"), N_("Transparent Cube"), NULL };
N_("None"), N_("Cube"), N_("Transparent Cube") };
vlc_module_begin();
set_description( _("OpenGL video output") );
......
......@@ -528,8 +528,8 @@ void config_Duplicate( module_t *p_module, module_config_t *p_orig )
if( p_module->p_config[i].ppsz_list )
{
for( j = 0; j < p_orig[i].i_list; j++ )
p_module->p_config[i].ppsz_list[j] =
strdup( p_orig[i].ppsz_list[j] );
p_module->p_config[i].ppsz_list[j] = p_orig[i].ppsz_list[j] ?
strdup( p_orig[i].ppsz_list[j] ) : NULL ;
p_module->p_config[i].ppsz_list[j] = NULL;
}
}
......@@ -540,8 +540,8 @@ void config_Duplicate( module_t *p_module, module_config_t *p_orig )
if( p_module->p_config[i].ppsz_list_text )
{
for( j = 0; j < p_orig[i].i_list; j++ )
p_module->p_config[i].ppsz_list_text[j] =
strdup( _(p_orig[i].ppsz_list_text[j]) );
p_module->p_config[i].ppsz_list_text[j] = _(p_orig[i].ppsz_list_text[j]) ?
strdup( _(p_orig[i].ppsz_list_text[j] ) ) : NULL ;
p_module->p_config[i].ppsz_list_text[j] = NULL;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment