Small mistake. Didn't maintain the texture pointer in the sprite so it could go out of scope and crash with use after free.

This commit is contained in:
Zed A. Shaw 2026-03-11 07:39:50 -04:00
parent 516f20124f
commit e88179b788
3 changed files with 8 additions and 3 deletions

View file

@ -30,6 +30,7 @@ namespace guecs {
bool stretch = true;
bool is_icon = false;
std::shared_ptr<sf::Sprite> sprite = nullptr;
std::shared_ptr<sf::Texture> texture = nullptr;
void init(lel::Cell &cell);
void update(const string& new_name);