X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68662769ff95f11208319be6fa303bfdd6d8331a..6342bd1ab36c1957684c00d408d09fba65d33db6:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index ca7605d9b9..3ace246251 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -524,14 +524,12 @@ void wxQueryNewPaletteEvent::CopyObject(wxObject& obj_d) const } wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win) - : wxEvent() { SetEventType(wxEVT_CREATE); SetEventObject(win); } wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win) - : wxEvent() { SetEventType(wxEVT_DESTROY); SetEventObject(win); @@ -803,7 +801,14 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) // BC++ doesn't like testing for m_fn without != 0 for ( int i = 0; table.entries[i].m_fn != 0; i++ ) { + // the line using reference exposes a bug in gcc: although it _seems_ + // to work, it leads to weird crashes later on during program + // execution +#ifdef __GNUG__ + wxEventTableEntry entry = table.entries[i]; +#else const wxEventTableEntry& entry = table.entries[i]; +#endif // match only if the event type is the same and the id is either -1 in // the event table (meaning "any") or the event id matches the id @@ -827,8 +832,6 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) return !event.GetSkipped(); } } - - i++; } return FALSE;