Avoid temporary object when creating new textures from disk
This commit is contained in:
parent
2f2adc6899
commit
9add86d745
1 changed files with 1 additions and 2 deletions
|
@ -1411,8 +1411,7 @@ static texture create_texture_from_file(const image::locator& loc)
|
|||
|
||||
// TODO: if we need to use SDL_RWops we should use IMG_LoadTexture_RW here instead.
|
||||
{
|
||||
texture temp(IMG_LoadTexture(renderer, location.c_str()));
|
||||
res = temp;
|
||||
res.assign(IMG_LoadTexture(renderer, location.c_str()));
|
||||
}
|
||||
|
||||
// TODO: decide what to do about this.
|
||||
|
|
Loading…
Add table
Reference in a new issue