mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-13 15:43:34 +00:00
fixing segmentation fault on mlx_destroy_image
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2022/10/04 22:10:52 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
|
else
|
||||||
texture->destroy();
|
texture->destroy();
|
||||||
for(auto& gs : _graphics)
|
for(auto& gs : _graphics)
|
||||||
gs->tryEraseTextureFromManager(texture);
|
{
|
||||||
|
if(gs)
|
||||||
|
gs->tryEraseTextureFromManager(texture);
|
||||||
|
}
|
||||||
_textures.erase(it);
|
_textures.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user