Be stricter about changing to the same state in wxWebRequest

This shouldn't happen, and doesn't, but if it ever does we'd better
return immediately rather than doing something that will almost surely
be wrong.
This commit is contained in:
Vadim Zeitlin 2021-03-24 16:04:02 +01:00
parent ce91a5d0ff
commit c0f8c0e0f2

View File

@ -205,7 +205,7 @@ struct StateEventProcessor
void wxWebRequestImpl::SetState(wxWebRequest::State state, const wxString & failMsg)
{
wxASSERT_MSG( state != m_state, "shouldn't switch to the same state" );
wxCHECK_RET( state != m_state, "shouldn't switch to the same state" );
wxLogTrace(wxTRACE_WEBREQUEST, "Request %p: state %d => %d", this, m_state, state);