ensure the advertiser actually exists before connecting the reload signal/slot

This commit is contained in:
MangosArentLiterature 2021-04-17 19:03:20 -05:00
parent 466089ad84
commit 522c9fb393

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 {