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:
@@ -75,6 +75,11 @@ WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str)
|
|||||||
|
|
||||||
WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
|
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
|
#if wxUSE_UNICODE
|
||||||
wxString str(bStr);
|
wxString str(bStr);
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user