Fixed memory leak in an error case

This commit is contained in:
Sam Lantinga 2012-09-28 02:43:13 -07:00
parent a3e3ca708c
commit 8fef68eb90

View file

@ -1044,6 +1044,7 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
case SDL_PIXELFORMAT_YVYU:
break;
default:
SDL_SW_DestroyYUVTexture(swdata);
SDL_SetError("Unsupported YUV format");
return NULL;
}