From aff8d1531ce108e7d851930d7929da91d60849e1 Mon Sep 17 00:00:00 2001 From: Atdunbg <979541498@qq.com> Date: Wed, 9 Jul 2025 17:52:29 +0800 Subject: [PATCH] add return --- Hazel/src/Platform/OpenGL/OpenGLTexture.cpp | 2 ++ 1 file changed, 2 insertions(+) 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;