Skip to content
Snippets Groups Projects
Commit 21cbcfef authored by Sébastien Blin's avatar Sébastien Blin
Browse files

ice: do not crash if no upnpContext is passed

Change-Id: I8ef7ed0336a02692fb3ec0959f2f7f8891c52808
parent 3cf0accd
No related branches found
No related tags found
No related merge requests found
......@@ -405,8 +405,13 @@ IceTransport::Impl::initIceInstance(const IceTransportOptions& options)
compCount_,
initiatorSession_ ? "master" : "slave");
if (upnpEnabled_)
if (upnpEnabled_) {
if (options.upnpContext) {
upnp_ = std::make_shared<upnp::Controller>(options.upnpContext);
} else if (logger_) {
logger_->error("[ice:{}] UPnP enabled, but no context found", fmt::ptr(this));
}
}
config_ = factory->getIceCfg(); // config copy
if (isTcp_) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment