summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r--indra/llimage/llimage.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 575ad5363d..5649b4cab7 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -668,10 +668,13 @@ 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)
{
- LLImageRaw* dst = this; // Just for clarity.
+ if (!src)
+ {
+ llwarns << "LLImageRaw::copy called with a null src pointer" << llendl;
+ return;
+ }
- llassert( (3 == src->getComponents()) || (4 == src->getComponents()) );
- llassert( (3 == dst->getComponents()) || (4 == dst->getComponents()) );
+ LLImageRaw* dst = this; // Just for clarity.
if( (src->getWidth() == dst->getWidth()) && (src->getHeight() == dst->getHeight()) )
{