diff options
Diffstat (limited to 'hw/display/vhost-user-gpu.c')
-rw-r--r-- | hw/display/vhost-user-gpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index c0c6691..14548f1 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -642,7 +642,7 @@ vhost_user_gpu_device_realize(DeviceState *qdev, Error **errp) static struct vhost_dev *vhost_user_gpu_get_vhost(VirtIODevice *vdev) { VhostUserGPU *g = VHOST_USER_GPU(vdev); - return &g->vhost->dev; + return g->vhost ? &g->vhost->dev : NULL; } static Property vhost_user_gpu_properties[] = { |