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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user