[MPlayer-cvslog] r33143 - trunk/gui/skin/skin.c

ib subversion at mplayerhq.hu
Tue Mar 29 12:45:13 CEST 2011


Author: ib
Date: Tue Mar 29 12:45:13 2011
New Revision: 33143

Log:
Prevent a segmentation fault.

If hpotmeter couldn't be created, a further item processing must not
take place.

Modified:
   trunk/gui/skin/skin.c

Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c	Tue Mar 29 12:31:03 2011	(r33142)
+++ trunk/gui/skin/skin.c	Tue Mar 29 12:45:13 2011	(r33143)
@@ -560,11 +560,15 @@ static int cmd_hpotmeter(char *in)
 // vpotmeter=button,bwidth,bheight,phases,numphases,default,x,y,width,height,message
 static int cmd_vpotmeter(char *in)
 {
-    int r = cmd_hpotmeter(in);
+    int r;
     wItem *item;
 
+    r = cmd_hpotmeter(in);
+
+    if (r == 0) {
     item       = &currWinItems[*currWinItemIdx];
     item->type = itVPotmeter;
+    }
 
     return r;
 }


More information about the MPlayer-cvslog mailing list