diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llimage/llimagebmp.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linden/indra/llimage/llimagebmp.cpp b/linden/indra/llimage/llimagebmp.cpp index 5d74c3e..8764dff 100644 --- a/linden/indra/llimage/llimagebmp.cpp +++ b/linden/indra/llimage/llimagebmp.cpp | |||
@@ -552,7 +552,10 @@ BOOL LLImageBMP::encode(const LLImageRaw* raw_image, F32 encode_time) | |||
552 | int file_bytes = line_bytes*getHeight() + header_bytes; | 552 | int file_bytes = line_bytes*getHeight() + header_bytes; |
553 | 553 | ||
554 | // Allocate the new buffer for the data. | 554 | // Allocate the new buffer for the data. |
555 | allocateData(file_bytes); | 555 | if(!allocateData(file_bytes)) //memory allocation failed |
556 | { | ||
557 | return FALSE ; | ||
558 | } | ||
556 | 559 | ||
557 | magic[0] = 'B'; magic[1] = 'M'; | 560 | magic[0] = 'B'; magic[1] = 'M'; |
558 | magic[2] = (U8) file_bytes; | 561 | magic[2] = (U8) file_bytes; |