diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index a7831069b..c5a2108f2 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -30,7 +30,7 @@ struct Client::Impl { jwt = jwt_cache.jwt; } // normalize host expression - if (this->host.back() == '/') { + if (!this->host.empty() && this->host.back() == '/') { static_cast(this->host.pop_back()); } }