From 2981e9aa4cdbe083011d1f552bf0fe5178a499ce Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 21 Jan 2010 15:10:25 -0800 Subject: checking for null in LLImageRaw::copy to prevent a crash --- indra/llimage/llimage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llimage') diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 575ad5363d..e02be6c8c1 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -668,6 +668,12 @@ void LLImageRaw::fill( const LLColor4U& color ) // Src and dst can be any size. Src and dst can each have 3 or 4 components. void LLImageRaw::copy(LLImageRaw* src) { + if (!src) + { + llwarns << "LLImageRaw::copy called with a null src pointer" << llendl; + return; + } + LLImageRaw* dst = this; // Just for clarity. llassert( (3 == src->getComponents()) || (4 == src->getComponents()) ); -- cgit v1.2.3