[wx-dev] Re: CVS: [ABX] wxWidgets/src/univ stdrend.cpp,1.13,1.14
ABX
abx at abx.art.pl
Mon Oct 2 05:35:00 PDT 2006
Vadim Zeitlin <vadim at wxwindows.org>:
> > Modified Files:
> > stdrend.cpp
> > Log Message:
> > Fixed crash caused by A=B?C:D used for returning wxObject derived type.
>
> Do you mean "fixed crash caused by a compiler bug"? :-/
Maybe. I just remember our own guidelines saying "The ternary operator ?:
shouldn't be used with objects"
> I can't see anything wrong with the old code, why exactly did it crash?
It's caused by:
wxASSERT_MSG( m_refData->m_count > 0, _T("invalid ref data count") );
in wxObject::UnRef(). I'll add longer investigation into my todo.
ABX
More information about the wx-dev
mailing list