From 12bbf81456dde4bc6f251d6e82bcc265eafa4a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 17 Feb 2012 12:15:27 -0500 Subject: [PATCH] compositor: Only delete surface texture if we have one --- src/compositor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index f07b14c7..c690a43c 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -592,7 +592,8 @@ destroy_surface(struct wl_resource *resource) weston_compositor_repick(compositor); } - glDeleteTextures(1, &surface->texture); + if (surface->texture) + glDeleteTextures(1, &surface->texture); if (surface->buffer) wl_list_remove(&surface->buffer_destroy_listener.link);