DF-1511 / fix.diff
diff --git a/sys/dev/video/vga/vga_switcheroo.c b/sys/dev/video/vga/vga_switcheroo.c --- a/sys/dev/video/vga/vga_switcheroo.c +++ b/sys/dev/video/vga/vga_switcheroo.c @@ -1229,6 +1229,11 @@ int ret; mutex_lock(&vgasr_priv->mux_hw_lk); + if (vgasr_priv->handler == NULL || + vgasr_priv->handler->switchto == NULL) { + mutex_unlock(&vgasr_priv->mux_hw_lk); + return -ENODEV; + } ret = vgasr_priv->handler->switchto(client_id); mutex_unlock(&vgasr_priv->mux_hw_lk); if (ret) |