From c0f8c0e0f2082c527cff3ac320e1f80eddbbda14 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 24 Mar 2021 16:04:02 +0100 Subject: [PATCH] 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. --- src/common/webrequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/webrequest.cpp b/src/common/webrequest.cpp index 5baca038be..a604c89eb7 100644 --- a/src/common/webrequest.cpp +++ b/src/common/webrequest.cpp @@ -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);