From 6e91a9cc3d5a610198cf526a76e2ab642f10ecd7 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:59 -0500 Subject: Second Life viewer sources 1.20.13 --- linden/indra/llimage/llimagebmp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'linden/indra/llimage/llimagebmp.cpp') 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) 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; -- cgit v1.1