summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-09-12 11:47:15 -0500
committerDave Parks <davep@lindenlab.com>2012-09-12 11:47:15 -0500
commit7325a95618daa181cbf82ce26d406cf85c1b684e (patch)
tree80652400307a24186c457eac8774b73775138fa3 /indra/llcommon
parentd6ea682458aa882b34cb5219d96b1a7297339eb9 (diff)
parent7b6e81ab03d361cc73c5d2f2fc88e857c7c95e13 (diff)
Automated merge with https://bitbucket.org/lindenlab/viewer-cat
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llmemory.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index d4f8c152e9..e7488a03d7 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -81,8 +81,11 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // r
#else
//FIXME: memcpy is SLOW
void* ret = ll_aligned_malloc_16(size);
- memcpy(ret, ptr, old_size);
- ll_aligned_free_16(ptr);
+ if (ptr)
+ {
+ memcpy(ret, ptr, old_size);
+ ll_aligned_free_16(ptr);
+ }
return ret;
#endif
}