Commit 3b7f5d47 authored by pbrook's avatar pbrook
Browse files

Avoid crash if -redir or -smb used without -net user.

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162
parent 1247c5f7
......@@ -1926,7 +1926,7 @@ static VLANClientState *slirp_vc;
int slirp_can_output(void)
return qemu_can_send_packet(slirp_vc);
return !slirp_vc || qemu_can_send_packet(slirp_vc);
void slirp_output(const uint8_t *pkt, int pkt_len)
......@@ -1935,6 +1935,8 @@ void slirp_output(const uint8_t *pkt, int pkt_len)
printf("slirp output:\n");
hex_dump(stdout, pkt, pkt_len);
if (!slirp_vc)
qemu_send_packet(slirp_vc, pkt, pkt_len);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment