]> git.saurik.com Git - wxWidgets.git/commitdiff
apparent gcc bug workaround
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Mar 2000 12:36:04 +0000 (12:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Mar 2000 12:36:04 +0000 (12:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/event.cpp

index 4f06fadc1929b96c9152f0830781b5236d10a505..646b0b89c4fb20e1805035b44c5cf766502a39e6 100644 (file)
@@ -803,7 +803,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