]> git.saurik.com Git - wxWidgets.git/commitdiff
assert if conversion ctors are used incorrectly
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 11 Aug 2004 08:18:37 +0000 (08:18 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 11 Aug 2004 08:18:37 +0000 (08:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index ffddc7611e070cc014c8bbb923fe4d5033dfb0fb..8bab9af7d4f1751505c18788f219665d323e968d 100644 (file)
@@ -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';