]> git.sesse.net Git - vlc/commitdiff
Prevent some segfaults when using hotkeys with no vout
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 14 Apr 2006 16:47:23 +0000 (16:47 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 14 Apr 2006 16:47:23 +0000 (16:47 +0000)
modules/control/hotkeys.c

index 2200c63241b28aef2e1fea3e0afa5c699e1fefa8..6903197afc2b0f23dcc04fed9294e2b03b515a3f 100644 (file)
@@ -511,7 +511,7 @@ static void Run( intf_thread_t *p_intf )
                                  _("Subtitle track: %s"),
                                  list2.p_list->p_values[i].psz_string );
             }
-            else if( i_action == ACTIONID_ASPECT_RATIO )
+            else if( i_action == ACTIONID_ASPECT_RATIO && p_vout )
             {
                 vlc_value_t val={0}, val_list, text_list;
                 var_Get( p_vout, "aspect-ratio", &val );
@@ -537,7 +537,7 @@ static void Run( intf_thread_t *p_intf )
                 }
                 free( val.psz_string );
             }
-            else if( i_action == ACTIONID_CROP )
+            else if( i_action == ACTIONID_CROP && p_vout )
             {
                 vlc_value_t val={0}, val_list, text_list;
                 var_Get( p_vout, "crop", &val );
@@ -563,7 +563,7 @@ static void Run( intf_thread_t *p_intf )
                 }
                 free( val.psz_string );
             }
-            else if( i_action == ACTIONID_DEINTERLACE )
+            else if( i_action == ACTIONID_DEINTERLACE && p_vout )
             {
                 vlc_value_t val={0}, val_list, text_list;
                 var_Get( p_vout, "deinterlace", &val );