X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..ba86da30cf1a2a8429f3af465cbb6c9f52b307fb:/src/common/variant.cpp diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 6d67625a5f..627edfbef6 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -1182,7 +1182,11 @@ void wxVariant::operator= (void* value) void* wxVariant::GetVoidPtr() const { - wxASSERT( (GetType() == wxT("void*")) ); + // handling this specially is convenient when working with COM, see #9873 + if ( IsNull() ) + return NULL; + + wxASSERT( GetType() == wxT("void*") ); return (void*) ((wxVariantDataVoidPtr*) m_data)->GetValue(); }