Fix a crash that happens if you play with video filters.
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 5 Sep 2008 08:07:09 +0000 (01:07 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 5 Sep 2008 08:09:01 +0000 (01:09 -0700)
Crash happens if you do:
 - Play item
 - Activate vfilter
 - Stop item
 - Deactivate vfilter... BooM.
(cherry picked from commit c876401791144309d2427214d818a34198238358)

modules/gui/qt4/components/extended_panels.cpp

index 8accbf9..04d07f1 100644 (file)
@@ -343,6 +343,10 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
     if( THEMIM->getInput() )
         p_vout = ( vout_thread_t * )vlc_object_find( THEMIM->getInput(),
                 VLC_OBJECT_VOUT, FIND_CHILD );
     if( THEMIM->getInput() )
         p_vout = ( vout_thread_t * )vlc_object_find( THEMIM->getInput(),
                 VLC_OBJECT_VOUT, FIND_CHILD );
+    /* If you have stopped the video, p_vout is still at its old value */
+    else
+        p_vout = NULL;
+
     if( p_vout )
     {
         if( !strcmp( psz_filter_type, "sub-filter" ) )
     if( p_vout )
     {
         if( !strcmp( psz_filter_type, "sub-filter" ) )