mirror of
https://github.com/Relintai/programming_tutorials.git
synced 2025-05-11 22:52:11 +02:00
Fix setting _texture to null in free().
This commit is contained in:
parent
b5ddef635e
commit
4999ba435a
@ -129,6 +129,8 @@ void Texture::refresh() {
|
|||||||
void Texture::free() {
|
void Texture::free() {
|
||||||
if (_texture) {
|
if (_texture) {
|
||||||
SDL_DestroyTexture(_texture);
|
SDL_DestroyTexture(_texture);
|
||||||
|
|
||||||
|
_texture = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user