From 597ee16421847ac338b3b2cfcd0e319398e9b54a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 11 Aug 2004 08:18:37 +0000 Subject: [PATCH] assert if conversion ctors are used incorrectly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/string.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/string.cpp b/src/common/string.cpp index ffddc7611e..8bab9af7d4 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -968,6 +968,7 @@ wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength) wxCharBuffer inBuf((const char *)NULL); if (nLength != npos) { + wxASSERT_MSG( psz != NULL ); wxCharBuffer tmp(nLength); memcpy(tmp.data(), psz, nLength); tmp.data()[nLength] = '\0'; @@ -1025,6 +1026,7 @@ wxString::wxString(const wchar_t *pwz, wxMBConv& conv, size_t nLength) wxWCharBuffer inBuf((const wchar_t *)NULL); if (nLength != npos) { + wxASSERT_MSG( pwz != NULL ); wxWCharBuffer tmp(nLength); memcpy(tmp.data(), pwz, nLength * sizeof(wchar_t)); tmp.data()[nLength] = '\0';