prevent XFree execution on wrong condition

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13102 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
iive 2004-08-23 09:52:25 +00:00
parent f7e124ccdb
commit eaa8aeddeb
1 changed files with 4 additions and 2 deletions

View File

@ -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);