[vlc-commits] Qt: add asserts around p_input access

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


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Oct 13 23:13:42 2011 +0200| [4919f543acdd5e5fe4cd5a081e833cc0989f03b7] | committer: Jean-Baptiste Kempf

Qt: add asserts around p_input access

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

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

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index fc8aa00..1146478 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -462,6 +462,8 @@ void InputManager::UpdateRate()
 
 void InputManager::UpdateName()
 {
+    assert( p_input );
+
     /* Update text, name and nowplaying */
     QString name;
 
@@ -689,6 +691,7 @@ void InputManager::UpdateArt()
 
 inline void InputManager::UpdateStats()
 {
+    assert( p_input );
     emit statisticsUpdated( input_GetItem( p_input ) );
 }
 
@@ -699,11 +702,13 @@ inline void InputManager::UpdateMeta( input_item_t *p_item )
 
 inline void InputManager::UpdateMeta()
 {
+    assert( p_input );
     emit currentMetaChanged( input_GetItem( p_input ) );
 }
 
 inline void InputManager::UpdateInfo()
 {
+    assert( p_input );
     emit infoChanged( input_GetItem( p_input ) );
 }
 



More information about the vlc-commits mailing list