aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-04-21 12:04:10 +0200
committerSimon Ser <contact@emersion.fr>2021-04-22 15:44:49 +0200
commitc314920a3d2bcb347d9ae491a678d8349f32ae8d (patch)
treeb3eddebb01b2d1cc228c9af0d4d1ababdd0a5345
parent8ca2b4cf49055eabcd2499bf3811d356d769bded (diff)
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
-rw-r--r--render/gles2/texture.c4
-rw-r--r--render/pixman/renderer.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 2b08dd50..7e2b01ae 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -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);
diff --git a/render/pixman/renderer.c b/render/pixman/renderer.c
index 688af9be..5e5deaa2 100644
--- a/render/pixman/renderer.c
+++ b/render/pixman/renderer.c
@@ -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);