[MPlayer-cvslog] r35459 - in trunk/gui/ui: main.c playbar.c
ib
subversion at mplayerhq.hu
Fri Nov 23 15:03:37 CET 2012
Author: ib
Date: Fri Nov 23 15:03:37 2012
New Revision: 35459
Log:
Prevent negative array index read.
Modified:
trunk/gui/ui/main.c
trunk/gui/ui/playbar.c
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Fri Nov 23 14:35:31 2012 (r35458)
+++ trunk/gui/ui/main.c Fri Nov 23 15:03:37 2012 (r35459)
@@ -511,6 +511,8 @@ void uiMainMouseHandle( int Button,int X
case wsP5MouseButton: value=-2.5f; goto rollerhandled;
case wsP4MouseButton: value= 2.5f;
rollerhandled:
+ if (currentselected != - 1)
+ {
item=&guiApp.mainItems[currentselected];
if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) )
{
@@ -518,6 +520,7 @@ rollerhandled:
btnModify( item->message,item->value );
uiEventHandling( item->message,item->value );
}
+ }
break;
/* moving */
Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c Fri Nov 23 14:35:31 2012 (r35458)
+++ trunk/gui/ui/playbar.c Fri Nov 23 15:03:37 2012 (r35459)
@@ -193,6 +193,8 @@ static void uiPlaybarMouseHandle( int Bu
case wsP5MouseButton: value=-2.5f; goto rollerhandled;
case wsP4MouseButton: value= 2.5f;
rollerhandled:
+ if (currentselected != - 1)
+ {
item=&guiApp.playbarItems[currentselected];
if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) )
{
@@ -200,6 +202,7 @@ rollerhandled:
btnModify( item->message,item->value );
uiEventHandling( item->message,item->value );
}
+ }
break;
/* --- */
case wsMoveMouse:
More information about the MPlayer-cvslog
mailing list