diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-02-06 21:15:51 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2026-02-07 15:03:15 +0200 |
| commit | a06a6f0a7b59fd4a68520dfc797f701573224c5c (patch) | |
| tree | 25bc489038d078dbe3b1f7e0a3776a823e2b23f7 /indra/newview | |
| parent | 30f0b8cad2d9164b0087550c42c2449f18eafa7c (diff) | |
#5380 Guard against scaled() failure to prevent null dereference
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 50dcc7a975..0f23596c9a 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1914,7 +1914,11 @@ bool LLViewerFetchedTexture::processFetchResults(S32& desired_discard, S32 curre // // BOOST_ICON gets scaling because profile icons can have a bunch of different formats, not just j2c // Might need another pass to use discard for j2c and scaling for everything else. - mRawImage = mRawImage->scaled(expected_width, expected_height); + LLPointer<LLImageRaw> scaled = mRawImage->scaled(expected_width, expected_height); + if (scaled.notNull()) + { + mRawImage = scaled; + } } } @@ -1929,7 +1933,11 @@ bool LLViewerFetchedTexture::processFetchResults(S32& desired_discard, S32 curre // // Todo: probably needs to be remade to use discard, all thumbnails are supposed to be j2c, // so no need to scale, should be posible to use discard to scale image down. - mRawImage = mRawImage->scaled(expected_width, expected_height); + LLPointer<LLImageRaw> scaled = mRawImage->scaled(expected_width, expected_height); + if (scaled.notNull()) + { + mRawImage = scaled; + } } } |
