vtest: fail on renderer init failure.

This stops us crashing later due to failing to init.

Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Dave Airlie 9 years ago
parent 7c3927ce08
commit 66708981de
  1. 10
      vtest/vtest_renderer.c

@ -96,9 +96,13 @@ int vtest_create_renderer(int fd, uint32_t length)
renderer.remote_fd = fd; renderer.remote_fd = fd;
virgl_renderer_init(&renderer, ret = virgl_renderer_init(&renderer,
VIRGL_RENDERER_USE_EGL | VIRGL_RENDERER_USE_EGL |
VIRGL_RENDERER_THREAD_SYNC, &vtest_cbs); VIRGL_RENDERER_THREAD_SYNC, &vtest_cbs);
if (ret) {
fprintf(stderr, "failed to initialise renderer.\n");
return -1;
}
vtestname = malloc(length); vtestname = malloc(length);
if (!vtestname) if (!vtestname)

Loading…
Cancel
Save