]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/buffer.h
Allow associating a validator with wxGridCellTextEditor.
[wxWidgets.git] / include / wx / buffer.h
index 6d98f6e286e52d86b7ee52c2e5aaf9c8c220731d..951777a13c47fd9fe74544ebf843056fde0c812c 100644 (file)
@@ -230,7 +230,8 @@ protected:
     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;
     }