static CharType *StrCopy(const CharType *src, size_t len)
{
CharType *dst = (CharType*)malloc(sizeof(CharType) * (len + 1));
- memcpy(dst, src, sizeof(CharType) * (len + 1));
+ if ( dst )
+ memcpy(dst, src, sizeof(CharType) * (len + 1));
return dst;
}
friend class wxMemoryBuffer;
- // everyting is private as it can only be used by wxMemoryBuffer
+ // everything is private as it can only be used by wxMemoryBuffer
private:
wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize)
: m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0)