]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
fix for always terminating intermediate UniChar String for 4 bytes wchar_t
[wxWidgets.git] / src / common / event.cpp
index 88efcebd7598a97443f01d6384b82f608972977b..8b0fb73f573af0229d1506ee87013c60c75b1ed9 100644 (file)
@@ -1095,6 +1095,11 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
 
 void wxEvtHandler::ProcessPendingEvents()
 {
+    // this method is only called by wxApp if this handler does have pending
+    // events
+    wxCHECK_RET( m_pendingEvents,
+                 wxT("Please call wxApp::ProcessPendingEvents() instead") );
+
 #if defined(__VISAGECPP__)
     wxENTER_CRIT_SECT( m_eventsLocker);
 #else
@@ -1330,7 +1335,7 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event )
         wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->GetData();
 #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
 
-        if ((event.m_eventType == entry->m_eventType) && (entry->m_fn != NULL))
+        if ((event.m_eventType == entry->m_eventType) && (entry->m_fn != 0))
         {
             wxEvtHandler *handler =
 #if !WXWIN_COMPATIBILITY_EVENT_TYPES