Fixed memory leak in an error case
This commit is contained in:
parent
a3e3ca708c
commit
8fef68eb90
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue