From a66ec26b814f832ff40e5e8100f0b90822ef4858 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 17 Dec 2024 00:21:42 +0200 Subject: #3295 Crash scaling texture down (#3296) --- indra/llrender/llimagegl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llrender') diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 5ac3243fd4..3858811a50 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2434,7 +2434,9 @@ bool LLImageGL::scaleDown(S32 desired_discard) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - if (mTarget != GL_TEXTURE_2D) + if (mTarget != GL_TEXTURE_2D + || mFormatInternal == -1 // not initialized + ) { return false; } -- cgit v1.2.3