CVS: [ABX] wxWidgets/src/univ stdrend.cpp,1.13,1.14
Vadim Zeitlin
vadim at wxwindows.org
Mon Oct 2 05:14:08 PDT 2006
On 2 Oct 2006 12:11:52 -0000 anonymous at sunsite.dk wrote:
> Update of /pack/cvsroots/wxwidgets/wxWidgets/src/univ
> In directory sunsite.dk:/tmp/cvs-serv6955
>
> 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"? :-/
> Index: stdrend.cpp
> ===================================================================
> RCS file: /pack/cvsroots/wxwidgets/wxWidgets/src/univ/stdrend.cpp,v
> retrieving revision 1.13
> retrieving revision 1.14
> diff -u -b -r1.13 -r1.14
> --- stdrend.cpp 2006/09/30 18:32:33 1.13
> +++ stdrend.cpp 2006/10/02 12:11:19 1.14
> @@ -167,9 +167,20 @@
> int WXUNUSED(flags),
> wxWindow *window)
> {
> - wxColour colBg = col.Ok() ? col
> - : window ? m_scheme->GetBackground(window)
> - : wxSCHEME_COLOUR(m_scheme, CONTROL);
> + wxColour colBg;
> +
> + if (col.Ok())
> + {
> + colBg = col;
> + }
> + else if (window)
> + {
> + colBg = m_scheme->GetBackground(window);
> + }
> + else
> + {
> + colBg = wxSCHEME_COLOUR(m_scheme, CONTROL);
> + }
I can't see anything wrong with the old code, why exactly did it crash?
Thanks,
VZ
More information about the wx-dev
mailing list