[vlc-commits] Qt: fill NULL-deref in jumping forward

Jean-Baptiste Kempf git at videolan.org
Thu Oct 13 23:06:25 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Oct 13 23:05:35 2011 +0200| [4f921a591453707451bbbf6c2a14f58d3264e2a6] | committer: Jean-Baptiste Kempf

Qt: fill NULL-deref in jumping forward

Close #5446

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

 modules/gui/qt4/input_manager.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 1b4bb1b..fc8aa00 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -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 );



More information about the vlc-commits mailing list