X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a518e5080d824422b592e95fb4a9f958b1cd0724..f8b1df0b15f843b8f47efb9bee38f1de0fa95020:/src/msw/ole/oleutils.cpp diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 1c37542f38..8fbcf99885 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -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