summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/image_upload.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/image_upload.hpp b/include/image_upload.hpp
index ef615cb3b8..8b3dc107c9 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -31,6 +31,12 @@ inline void
asyncResp->res.result(boost::beast::http::status::service_unavailable);
return;
}
+ if (req.ioService == nullptr)
+ {
+ asyncResp->res.result(
+ boost::beast::http::status::internal_server_error);
+ return;
+ }
// Make this const static so it survives outside this method
static boost::asio::steady_timer timeout(*req.ioService,
std::chrono::seconds(5));