summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagebmp.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-07-22 19:01:52 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-07-22 19:01:52 +0000
commit0c0391cc7114bd2e9e4462c40e88814326f61bc2 (patch)
tree2906124fe8371b6336e6f7231cd890d267a75d6d /indra/llimage/llimagebmp.cpp
parented386ae547c225e352c39e8d14921572ee534b0b (diff)
QAR-758 1.20 Viewer RC 12, 13, 14, 15 -> Release
merge Branch_1-20-14-Viewer-merge -> release Includes Branch_1-20-Viewer-2 through 92456
Diffstat (limited to 'indra/llimage/llimagebmp.cpp')
-rw-r--r--indra/llimage/llimagebmp.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp
index b6b1d695d1..477119b82d 100644
--- a/indra/llimage/llimagebmp.cpp
+++ b/indra/llimage/llimagebmp.cpp
@@ -552,7 +552,10 @@ BOOL LLImageBMP::encode(const LLImageRaw* raw_image, F32 encode_time)
int file_bytes = line_bytes*getHeight() + header_bytes;
// Allocate the new buffer for the data.
- allocateData(file_bytes);
+ if(!allocateData(file_bytes)) //memory allocation failed
+ {
+ return FALSE ;
+ }
magic[0] = 'B'; magic[1] = 'M';
magic[2] = (U8) file_bytes;