diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 058f4afd87..cfae38d0d6 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -84,6 +84,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