diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-08-21 23:55:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 23:55:00 +0300 |
commit | 0b6c9c50c3049eb75a0305376d067bf8982e184d (patch) | |
tree | a8e3497057e5b170e3a9ca22c9161822c149cbd6 /indra/llimage/llimagedimensionsinfo.cpp | |
parent | b07a9cfec36cdcad604b8aa775ed282793116a4d (diff) |
SL-20173 show warning notification when trying to add invalid files as local texture
Diffstat (limited to 'indra/llimage/llimagedimensionsinfo.cpp')
-rw-r--r-- | indra/llimage/llimagedimensionsinfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index 97b543f3b6..5756ddb32b 100644 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -90,6 +90,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp() if (signature[0] != 'B' || signature[1] != 'M') { LL_WARNS() << "Not a BMP" << LL_ENDL; + mWarning = "IncorrectFormat"; return false; } @@ -140,6 +141,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng() if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a PNG" << LL_ENDL; + mWarning = "IncorrectFormat"; return false; } @@ -183,6 +185,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0) { LL_WARNS() << "Not a JPEG" << LL_ENDL; + mWarning = "IncorrectFormat"; return false; } fseek(fp, 0, SEEK_SET); // go back to start of the file |