diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-07-17 15:06:23 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-07-17 15:06:23 -0700 |
commit | 040050af19ff7b5b2f5dc5ce5c4b68cfbb7e492a (patch) | |
tree | fcde4fb3af978615315f83204e6d7351f3b5f02c /indra/llrender/llimagegl.cpp | |
parent | f7f9601567ce089f3335407f1d3c7d32dbb18c60 (diff) | |
parent | f975cfd7361729195f2bb14d874e5eacc6140759 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 3e3a3095e3..b77f98d65e 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -905,9 +905,16 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 stop_glerror(); if (prev_mip_data) - delete[] prev_mip_data; + { + if (prev_mip_data != cur_mip_data) + delete[] prev_mip_data; + prev_mip_data = nullptr; + } if (cur_mip_data) + { delete[] cur_mip_data; + cur_mip_data = nullptr; + } mGLTextureCreated = false; return FALSE; |