mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
ui/xemu-net.c: Handle missing slirp state
This commit is contained in:
committed by
mborgerson
parent
37e0f59c81
commit
cd8529919f
@@ -167,6 +167,10 @@ static void remove_netdev(const char *name)
|
||||
static void clear_slirp_port_forwards(void)
|
||||
{
|
||||
void *s = slirp_get_state_from_netdev(id);
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct in_addr host_addr = { .s_addr = INADDR_ANY };
|
||||
for (int i = 0; i < g_config.net.nat.forward_ports_count; i++) {
|
||||
slirp_remove_hostfwd(s,
|
||||
|
||||
Reference in New Issue
Block a user