drm: fix crasher in unload_backend

we were freeing the state struct and then closing items in it.
This commit is contained in:
Ray Strode 2015-07-30 15:55:28 -04:00
parent ed5aa69d4a
commit d37da49aca

View file

@ -707,13 +707,14 @@ unload_backend (ply_renderer_backend_t *backend)
ply_trace ("unloading backend");
destroy_backend (backend);
backend = NULL;
if (backend->device_fd >= 0) {
drmClose (backend->device_fd);
backend->device_fd = -1;
}
destroy_backend (backend);
backend = NULL;
}
static bool