[vlc-devel] commit: Qt: fix crashes possible in Hotkey settings. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Thu Apr 9 18:15:06 CEST 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Apr 9 18:14:22 2009 +0200| [f5d10727954d8b176a25a54e12e30832b599b509] | committer: Jean-Baptiste Kempf
Qt: fix crashes possible in Hotkey settings.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5d10727954d8b176a25a54e12e30832b599b509
---
modules/gui/qt4/components/preferences_widgets.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index ebd01d0..96dcb92 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -1248,6 +1248,7 @@ void KeySelectorControl::finish()
void KeySelectorControl::select1Key()
{
QTreeWidgetItem *keyItem = table->currentItem();
+ if( !keyItem ) return;
shortcutValue->setText( keyItem->text( 1 ) );
shortcutValue->setValue( keyItem->data( 1, Qt::UserRole ).toInt() );
}
@@ -1293,6 +1294,7 @@ void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem )
void KeySelectorControl::setTheKey()
{
+ if( !table->currentItem() ) return;
table->currentItem()->setText( 1, shortcutValue->text() );
table->currentItem()->setData( 1, Qt::UserRole, shortcutValue->getValue() );
}
More information about the vlc-devel
mailing list