Fixes segfault
authorRafaël Carré <funman@videolan.org>
Sun, 9 Sep 2007 14:46:22 +0000 (14:46 +0000)
committerRafaël Carré <funman@videolan.org>
Sun, 9 Sep 2007 14:46:22 +0000 (14:46 +0000)
src/video_output/vout_subpictures.c

index 06a7dba..aa5037d 100644 (file)
@@ -226,8 +226,9 @@ void spu_Destroy( spu_t *p_spu )
 static void spu_DeleteChain( spu_t *p_spu )
 {
     if( p_spu->i_filter )
-    while( p_spu->i_filter-- )
+    while( p_spu->i_filter )
     {
+        p_spu->i_filter--;
         module_Unneed( p_spu->pp_filter[p_spu->i_filter],
                        p_spu->pp_filter[p_spu->i_filter]->p_module );
         free( p_spu->pp_filter[p_spu->i_filter]->p_owner );