From 522c9fb39359b5207ebeb145edfce7e850a6245b Mon Sep 17 00:00:00 2001 From: MangosArentLiterature <58055358+MangosArentLiterature@users.noreply.github.com> Date: Sat, 17 Apr 2021 19:03:20 -0500 Subject: [PATCH] ensure the advertiser actually exists before connecting the reload signal/slot --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 8579592..e8b63e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -62,7 +62,10 @@ int main(int argc, char* argv[]) } 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(); } } else {