[vlc-devel] commit: Fixed an unlikely segfault (subtitles). (Laurent Aimar )

git version control git at videolan.org
Sat Nov 29 10:53:17 CET 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Nov 29 01:18:53 2008 +0100| [4bd735fba88b1f8174e68f4719f5ca2779df6b7f] | committer: Laurent Aimar 

Fixed an unlikely segfault (subtitles).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bd735fba88b1f8174e68f4719f5ca2779df6b7f
---

 src/video_output/vout_subpictures.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 697bf7d..a1fb427 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1604,8 +1604,11 @@ exit:
          * pre-rendered state, so the next time through everything is
          * calculated again.
          */
-        picture_Release( p_region->p_picture );
-        p_region->p_picture = NULL;
+        if( p_region->p_picture )
+        {
+            picture_Release( p_region->p_picture );
+            p_region->p_picture = NULL;
+        }
         if( p_region->p_private )
         {
             SpuRegionPrivateDelete( p_region->p_private );




More information about the vlc-devel mailing list