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:
parent
8ca2b4cf49
commit
c314920a3d
|
@ -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) {
|
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);
|
struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
|
||||||
|
|
||||||
wl_list_remove(&texture->link);
|
wl_list_remove(&texture->link);
|
||||||
|
|
|
@ -43,11 +43,7 @@ static bool texture_is_opaque(struct wlr_texture *wlr_texture) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void texture_destroy(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);
|
struct wlr_pixman_texture *texture = get_texture(wlr_texture);
|
||||||
|
|
||||||
wl_list_remove(&texture->link);
|
wl_list_remove(&texture->link);
|
||||||
pixman_image_unref(texture->image);
|
pixman_image_unref(texture->image);
|
||||||
free(texture->data);
|
free(texture->data);
|
||||||
|
|
Loading…
Reference in New Issue