diff --git a/src/core/application.cpp b/src/core/application.cpp index d000908..9ab3cfc 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */ -/* Updated: 2024/04/22 17:35:15 by maldavid ### ########.fr */ +/* Updated: 2024/04/24 13:52:18 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -108,7 +108,10 @@ namespace mlx::core else texture->destroy(); for(auto& gs : _graphics) - gs->tryEraseTextureFromManager(texture); + { + if(gs) + gs->tryEraseTextureFromManager(texture); + } _textures.erase(it); }