render: remove NULL checks in wlr_texture_impl.destroy

The NULL check already exists in wlr_texture_destroy, no need to
duplicate it in each impl
This commit is contained in:
Simon Ser 2021-04-21 12:04:10 +02:00
parent 8ca2b4cf49
commit c314920a3d
2 changed files with 0 additions and 8 deletions

View file

@ -99,10 +99,6 @@ static bool gles2_texture_write_pixels(struct wlr_texture *wlr_texture,
}
static void gles2_texture_destroy(struct wlr_texture *wlr_texture) {
if (wlr_texture == NULL) {
return;
}
struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
wl_list_remove(&texture->link);

View file

@ -43,11 +43,7 @@ static bool texture_is_opaque(struct wlr_texture *wlr_texture) {
}
static void texture_destroy(struct wlr_texture *wlr_texture) {
if (wlr_texture == NULL) {
return;
}
struct wlr_pixman_texture *texture = get_texture(wlr_texture);
wl_list_remove(&texture->link);
pixman_image_unref(texture->image);
free(texture->data);