]> git.sesse.net Git - vlc/commitdiff
Qt: fill NULL-deref in jumping forward
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 13 Oct 2011 21:05:35 +0000 (23:05 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 13 Oct 2011 21:05:35 +0000 (23:05 +0200)
Close #5446

modules/gui/qt4/input_manager.cpp

index 1b4bb1b48e1a21804bef465752108635b96e6585..fc8aa00feb69c24347c4d40ba2a3a16583409069 100644 (file)
@@ -882,7 +882,7 @@ void InputManager::setRate( int new_rate )
 void InputManager::jumpFwd()
 {
     int i_interval = var_InheritInteger( p_input, "short-jump-size" );
-    if( i_interval > 0 )
+    if( i_interval > 0 && hasInput() )
     {
         mtime_t val = CLOCK_FREQ * i_interval;
         var_SetTime( p_input, "time-offset", val );
@@ -892,7 +892,7 @@ void InputManager::jumpFwd()
 void InputManager::jumpBwd()
 {
     int i_interval = var_InheritInteger( p_input, "short-jump-size" );
-    if( i_interval > 0 )
+    if( i_interval > 0 && hasInput() )
     {
         mtime_t val = -CLOCK_FREQ * i_interval;
         var_SetTime( p_input, "time-offset", val );