[vlc-commits] Qt: avoid a crash on displaying the chapters for some mp4

Jean-Baptiste Kempf git at videolan.org
Mon Jan 9 22:08:57 CET 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jan  9 22:08:24 2012 +0100| [491b918f5628a502a6bcf89141e5ecfba3c7757d] | committer: Jean-Baptiste Kempf

Qt: avoid a crash on displaying the chapters for some mp4

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

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

diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index ecbcd25..77494a6 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -260,7 +260,7 @@ void SeekSlider::mouseMoveEvent( QMouseEvent *event )
                     if ( event->x() >= x )
                         i_selected = i + ( ( b_startsnonzero )? 1 : 0 );
                 }
-                if ( i_selected >= 0 )
+                if ( i_selected >= 0 && i_selected < points.size() )
                     chapterLabel = points.at( i_selected ).name;
         }
 



More information about the vlc-commits mailing list