From eaa8aeddebb28544c97f947412176606c27e16b0 Mon Sep 17 00:00:00 2001 From: iive Date: Mon, 23 Aug 2004 09:52:25 +0000 Subject: [PATCH] prevent XFree execution on wrong condition git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13102 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xvmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index cd22ecc2ba..2c95d20746 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -207,8 +207,8 @@ int attrib_count,i; if(keycolor_handling == AUTO_COLORKEY){ //XV_AUTOPING_COLORKEY doesn't work for XvMC yet(NVidia 43.63) attributes = XvQueryPortAttributes(mDisplay, xv_port, &attrib_count); - if(attributes!=NULL) - for (i = 0; i < attrib_count; i++) + if(attributes!=NULL){ + for (i = 0; i < attrib_count; i++){ if (!strcmp(attributes[i].name, "XV_AUTOPAINT_COLORKEY")) { xv_atom = XInternAtom(mDisplay, "XV_AUTOPAINT_COLORKEY", False); @@ -220,7 +220,9 @@ int attrib_count,i; } break; } + } XFree(attributes); + } } xv_atom = XInternAtom(mDisplay, "XV_COLORKEY",False);