[vlc-devel] commit: Qt: Check for NULLity to avoid segfault in AdvPrefs. CLose #1957 ( Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Aug 31 19:20:01 CEST 2008


vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Sun Aug 31 10:21:43 2008 -0700| [1cc0e23f07c7248b0db0f20868cbaf4b39699118] | committer: Jean-Baptiste Kempf 

Qt: Check for NULLity to avoid segfault in AdvPrefs. CLose #1957

I just don't understand why double-clicking in an empty space does trigger the
event, but it does...

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

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

diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp
index d8884aa..f00fec2 100644
--- a/modules/gui/qt4/dialogs/preferences.cpp
+++ b/modules/gui/qt4/dialogs/preferences.cpp
@@ -225,6 +225,7 @@ void PrefsDialog::changeSimplePanel( int number )
 /* Changing from one Advanced Panel to another */
 void PrefsDialog::changeAdvPanel( QTreeWidgetItem *item )
 {
+    if( item == NULL ) return;
     PrefsItemData *data = item->data( 0, Qt::UserRole ).value<PrefsItemData*>();
 
     if( advanced_panel )




More information about the vlc-devel mailing list