mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Fix software cursors
This commit is contained in:
parent
de6f32c84e
commit
2facf1df65
4 changed files with 19 additions and 11 deletions
|
|
@ -245,10 +245,12 @@ static struct wlr_renderer_impl wlr_renderer_impl = {
|
|||
|
||||
struct wlr_renderer *wlr_gles2_renderer_init(struct wlr_backend *backend) {
|
||||
init_globals();
|
||||
struct wlr_egl *egl = wlr_backend_get_egl(backend);
|
||||
struct wlr_gles2_renderer *renderer =
|
||||
calloc(1, sizeof(struct wlr_gles2_renderer));
|
||||
wlr_renderer_init(&renderer->wlr_renderer, &wlr_renderer_impl);
|
||||
renderer->egl = egl;
|
||||
if (backend) {
|
||||
struct wlr_egl *egl = wlr_backend_get_egl(backend);
|
||||
renderer->egl = egl;
|
||||
}
|
||||
return &renderer->wlr_renderer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
|
|||
}
|
||||
|
||||
void wlr_renderer_destroy(struct wlr_renderer *r) {
|
||||
if (r->impl->destroy) {
|
||||
if (r && r->impl->destroy) {
|
||||
r->impl->destroy(r);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ void wlr_texture_init(struct wlr_texture *texture,
|
|||
}
|
||||
|
||||
void wlr_texture_destroy(struct wlr_texture *texture) {
|
||||
if (texture->impl->destroy) {
|
||||
if (texture && texture->impl->destroy) {
|
||||
texture->impl->destroy(texture);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue