]> git.sesse.net Git - vlc/commitdiff
hotkeys.c: Print a warning and do nothing when something issues a 0
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Tue, 1 May 2007 09:58:59 +0000 (09:58 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Tue, 1 May 2007 09:58:59 +0000 (09:58 +0000)
keyevent, rather than execute the last unassigned key action. Fixes an
issue that causes the playback to be unintenionally paused whenever a
modifier is pressed and the qt4 interface has focus (key-pause is not
assigned by default)

modules/control/hotkeys.c

index d4d434ec69017190d3943702ff067db8a59dfb90..6f62227546aec161a47adaa3d1ed35b3aac15e43 100644 (file)
@@ -750,6 +750,11 @@ static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
                      vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_data;
+    if ( !newval.i_int )
+    {
+        msg_Warn( p_this, "Received invalid key event %d", newval.i_int );
+        return VLC_EGENERIC;
+    }
     vlc_mutex_lock( &p_intf->p_sys->change_lock );
     if ( p_intf->p_sys->i_size == BUFFER_SIZE )
     {