possible fix for some errors with vector, and fixed ARC_Text_SetString memory leak
This commit is contained in:
parent
1450bb7c86
commit
bb67a87451
2 changed files with 11 additions and 1 deletions
|
|
@ -32,6 +32,9 @@ void ARC_Text_SetString(ARC_Text *text, ARC_Renderer *renderer, ARC_String *stri
|
|||
text->bounds.w = surface->w;
|
||||
text->bounds.h = surface->h;
|
||||
|
||||
if(text->texture){
|
||||
SDL_DestroyTexture(text->texture);
|
||||
}
|
||||
text->texture = SDL_CreateTextureFromSurface((SDL_Renderer *)renderer, surface);
|
||||
|
||||
SDL_FreeSurface(surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue