X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8421cb3c7cab3017fd991ee628126813ee2d794a..8626e0b73de21463908bf855700c31e41c661b30:/src/common/wxcrt.cpp diff --git a/src/common/wxcrt.cpp b/src/common/wxcrt.cpp index f58ac30fd0..5e8304da52 100644 --- a/src/common/wxcrt.cpp +++ b/src/common/wxcrt.cpp @@ -834,7 +834,8 @@ wxChar32* wxStrdup(const wxChar32* s) { size_t size = (wxStrlen(s) + 1) * sizeof(wxChar32); wxChar32 *ret = (wxChar32*) malloc(size); - memcpy(ret, s, size); + if ( ret ) + memcpy(ret, s, size); return ret; } #endif