Merge pull request #82 from AttorneyOnline/reload-fix

Ensure the advertiser actually exists before connecting the reload signal/slot
This commit is contained in:
Marisa P 2021-04-17 20:38:26 -05:00 committed by GitHub
commit eded7932d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,10 @@ int main(int argc, char* argv[])
} }
server = new Server(settings.port, settings.ws_port); server = new Server(settings.port, settings.ws_port);
QObject::connect(server, &Server::reloadRequest, advertiser, &Advertiser::reloadRequested);
if (advertiser != nullptr) {
QObject::connect(server, &Server::reloadRequest, advertiser, &Advertiser::reloadRequested);
}
server->start(); server->start();
} }
} else { } else {