diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 00:12:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-12 00:12:30 +0300 |
| commit | dfbbad813f3a1b9a151db7b25d3657590324ca4c (patch) | |
| tree | e31cee85f651a874c4b6edc7491efa0cb2ec93d5 /indra/llimage/llimagedimensionsinfo.cpp | |
| parent | 17e1f3692c5c1e9cbc6ba6895b312a8baae9aec2 (diff) | |
| parent | d0102af56d3b1d5b1d9bf3c8eb9aeea77028b70e (diff) | |
Merge pull request #1204 from Ansariel/DRTVWR-600-maint-A
Merge main into maint-A
Diffstat (limited to 'indra/llimage/llimagedimensionsinfo.cpp')
| -rw-r--r-- | indra/llimage/llimagedimensionsinfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index 234a504a14..c5e4b76012 100644 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -50,6 +50,7 @@ bool LLImageDimensionsInfo::load(const std::string& src_filename,U32 codec) if (file_size == 0) { + mWarning = "texture_load_empty_file"; setLastError("File is empty",src_filename); return false; } @@ -90,6 +91,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp() if (signature[0] != 'B' || signature[1] != 'M') { LL_WARNS() << "Not a BMP" << LL_ENDL; + mWarning = "texture_load_format_error"; return false; } @@ -140,6 +142,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng() if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a PNG" << LL_ENDL; + mWarning = "texture_load_format_error"; return false; } @@ -183,6 +186,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a JPEG" << LL_ENDL; + mWarning = "texture_load_format_error"; return false; } fseek(fp, 0, SEEK_SET); // go back to start of the file |
