protect call to glDeleteSamplers

Otherwise, it'd be possible to generate evil commands from a rouge
guest-driver that can crash the VM.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Erik Faye-Lund 6 years ago committed by Dave Airlie
parent 89f7995746
commit 4349893052
  1. 3
      src/vrend_renderer.c

@ -1354,7 +1354,8 @@ static void vrend_destroy_sampler_state_object(void *obj_ptr)
{
struct vrend_sampler_state *state = obj_ptr;
glDeleteSamplers(1, &state->id);
if (vrend_state.have_samplers)
glDeleteSamplers(1, &state->id);
FREE(state);
}

Loading…
Cancel
Save