diff --git a/Hazel/src/Platform/OpenGL/OpenGLTexture.cpp b/Hazel/src/Platform/OpenGL/OpenGLTexture.cpp index 131b8b1..367f3d9 100644 --- a/Hazel/src/Platform/OpenGL/OpenGLTexture.cpp +++ b/Hazel/src/Platform/OpenGL/OpenGLTexture.cpp @@ -41,6 +41,8 @@ namespace Hazel if (!data) { HZ_CORE_ERROR("Failed to load texture {0}", path); + stbi_image_free(data); + return; } m_Width = width; m_Height = height;