- if( !sp == NULL )
- return VLC_EGENERIC;
-
- init_xx44_palette( &p_vout->p_sys->palette, sp->num_palette_entries );
- p_vout->p_sys->xvmc_palette = (char *) malloc( sp->num_palette_entries
- * sp->entry_bytes );
- xxmc_xvmc_free_subpicture( p_vout, sp);
- if( !p_vout->p_sys->xvmc_palette )
- return VLC_EGENERIC;
- p_vout->p_sys->hwSubpictures = 1;
+ if( sp )
+ {
+ init_xx44_palette( &p_vout->p_sys->palette, sp->num_palette_entries );
+ p_vout->p_sys->xvmc_palette = (char *) malloc( sp->num_palette_entries
+ * sp->entry_bytes );
+ xxmc_xvmc_free_subpicture( p_vout, sp);
+ if( !p_vout->p_sys->xvmc_palette )
+ return VLC_EGENERIC;
+ p_vout->p_sys->hwSubpictures = 1;
+ }