From fecf4ac3e88d50e4ddbc0028dba6b00cea07b3e3 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 14 Dec 2018 17:10:34 +0000 Subject: [PATCH] Fix #8434: Crash if curl_easy_init fails --- distribution/changelog.txt | 1 + src/openrct2/network/Http.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 0d5e5ccd18..579e32b8f0 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -38,6 +38,7 @@ - Fix: [#8204] Crash when tile element has no surface elements. - Fix: [#8358] Infinite loop when changing vehicle count on stopped ride. - Fix: [#8433] Crash if master server response is not valid JSON. +- Fix: [#8434] Crash if curl_easy_init fails. - Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only). - Improved: [#7730] Draw extreme vertical and lateral Gs red in the ride window's graph tab. - Improved: [#7930] Automatically create folders for custom content. diff --git a/src/openrct2/network/Http.cpp b/src/openrct2/network/Http.cpp index ee4f30e4f1..8dc5eae94b 100644 --- a/src/openrct2/network/Http.cpp +++ b/src/openrct2/network/Http.cpp @@ -98,7 +98,7 @@ namespace OpenRCT2::Network::Http std::shared_ptr _(nullptr, [curl](...) { curl_easy_cleanup(curl); }); if (!curl) - std::runtime_error("Failed to initialize curl"); + throw std::runtime_error("Failed to initialize curl"); Response res; WriteThis wt;