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:
parent
516f20124f
commit
e88179b788
3 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue