[Scummvm-git-logs] scummvm branch-2-8 -> e252c229eb51b15f86d3d92b543532917cd80749
lephilousophe
noreply at scummvm.org
Sat Dec 9 23:03:17 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e252c229eb BACKENDS: NETWORKING: Don't handle request if it's not processing
Commit: e252c229eb51b15f86d3d92b543532917cd80749
https://github.com/scummvm/scummvm/commit/e252c229eb51b15f86d3d92b543532917cd80749
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-12-09T23:58:59+01:00
Commit Message:
BACKENDS: NETWORKING: Don't handle request if it's not processing
This avoids an error when aborting a request which notifies on a
disappeared dialog and raises a SIGSEGV
Changed paths:
backends/networking/curl/sessionrequest.cpp
diff --git a/backends/networking/curl/sessionrequest.cpp b/backends/networking/curl/sessionrequest.cpp
index 6b03f04087d..75b72a136fb 100644
--- a/backends/networking/curl/sessionrequest.cpp
+++ b/backends/networking/curl/sessionrequest.cpp
@@ -153,6 +153,10 @@ void SessionRequest::reuse(const Common::String &url, const Common::String &loca
}
void SessionRequest::handle() {
+ if (_state != PROCESSING) {
+ return;
+ }
+
if (!_stream) _stream = makeStream();
if (_stream) {
@@ -221,6 +225,8 @@ void SessionRequest::close() {
}
void SessionRequest::abortRequest() {
+ _state = FINISHED;
+
if (_localFile) {
_localFile->close();
delete _localFile;
@@ -228,7 +234,6 @@ void SessionRequest::abortRequest() {
// TODO we need to remove file, but there is no API
}
- _state = FINISHED;
}
bool SessionRequest::complete() {
More information about the Scummvm-git-logs
mailing list