handle NULL BSTRs as empty ones per Microsoft convention
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
905e090500
commit
795b0f1444
@ -75,6 +75,11 @@ WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str)
|
||||
|
||||
WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
|
||||
{
|
||||
// NULL BSTR is equivalent to an empty string (this is the convention used
|
||||
// by VB and hence we must follow it)
|
||||
if ( !bStr )
|
||||
return wxString();
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
wxString str(bStr);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user