Stop the internal server only if it exists.

This commit is contained in:
Matthieu Gautier 2020-10-07 14:35:51 +02:00
parent de6b8ba4de
commit 61f9d4ab3a
1 changed files with 4 additions and 2 deletions

View File

@ -53,8 +53,10 @@ bool Server::start() {
}
void Server::stop() {
mp_server->stop();
mp_server.reset(nullptr);
if (mp_server) {
mp_server->stop();
mp_server.reset(nullptr);
}
}
void Server::setRoot(const std::string& root)