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

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


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

Qt: avoid a crash on displaying the chapters for some mp4
(cherry picked from commit 491b918f5628a502a6bcf89141e5ecfba3c7757d)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=7a0d24520b4c41ea0ec487a4911d0d3d69413d70
---

 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