forked from premiere/premiere-libtorrent
avoid runtime fail with wrong arguments in upnp::update_map (#2094)
This commit is contained in:
parent
f6ca04638c
commit
18eef80676
|
@ -778,6 +778,9 @@ void upnp::update_map(rootdevice& d, int const i)
|
||||||
|
|
||||||
if (d.upnp_connection) return;
|
if (d.upnp_connection) return;
|
||||||
|
|
||||||
|
// this should not happen, but in case it does, don't fail at runtime
|
||||||
|
if (i >= d.mapping.end_index()) return;
|
||||||
|
|
||||||
std::shared_ptr<upnp> me(self());
|
std::shared_ptr<upnp> me(self());
|
||||||
|
|
||||||
mapping_t& m = d.mapping[i];
|
mapping_t& m = d.mapping[i];
|
||||||
|
|
Loading…
Reference in New Issue