]> git.sesse.net Git - vlc/commitdiff
Fix "Seg fault when changing mosaic 'offsets' option on the fly." Patch by hovis...
authorAntoine Cellerier <dionoea@videolan.org>
Thu, 28 Jun 2007 19:32:02 +0000 (19:32 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Thu, 28 Jun 2007 19:32:02 +0000 (19:32 +0000)
modules/video_filter/mosaic.c

index babe36f278b31f8add5cdb8e5b5e61e734c7382e..8670f46085814d9543ff47ca2581d60ba769b52f 100644 (file)
@@ -889,10 +889,12 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
 
         if( p_sys->i_offsets_length != 0 )
         {
+            p_sys->i_offsets_length = 0;
             free( p_sys->pi_x_offsets );
             free( p_sys->pi_y_offsets );
+            p_sys->pi_x_offsets = NULL;
+            p_sys->pi_y_offsets = NULL;
         }
-        p_sys->i_offsets_length = 0;
 
         mosaic_ParseSetOffsets( p_this, p_sys, newval.psz_string );