added wxSafeConvertMB2WX/WX2MB() and use them when interfacing with C functions which crash if we pass them NULL pointers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-11 23:38:42 +00:00
parent fe295b0d3e
commit 69c928ef47
5 changed files with 65 additions and 17 deletions

View File

@@ -90,7 +90,7 @@ bool wxGetUserName(wxChar *buf, int maxSize)
return false;
}
wxStrncpy (buf, wxConvertMB2WX(id), maxSize - 1);
wxStrncpy (buf, wxSafeConvertMB2WX(id), maxSize - 1);
// free the buffer
MemPtrUnlock(id);