diff options
-rw-r--r-- | hw/net/vhost_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index dc61dc1c5f..f2d49ad7e7 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -428,7 +428,7 @@ int vhost_set_vring_enable(NetClientState *nc, int enable) nc->vring_enable = enable; - if (vhost_ops->vhost_set_vring_enable) { + if (vhost_ops && vhost_ops->vhost_set_vring_enable) { return vhost_ops->vhost_set_vring_enable(&net->dev, enable); } |