aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornyorain <nyorain@gmail.com>2017-08-09 16:25:54 +0200
committernyorain <nyorain@gmail.com>2017-08-09 17:27:12 +0200
commitfb58307a5006366e791c96491f855777a11fdf2c (patch)
tree969d1e4d3d557cdeaa6544ebf3ffd7b4579d5fbd
parentcf9ee6ce3fe6d9b35f5c737c3fefa6759f8095c0 (diff)
Fix surface destruction
-rw-r--r--types/wlr_surface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index 4a72159c..c6011e86 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -6,8 +6,6 @@
#include <wlr/types/wlr_surface.h>
static void surface_destroy(struct wl_client *client, struct wl_resource *resource) {
- struct wlr_surface *surface = wl_resource_get_user_data(resource);
- wl_signal_emit(&surface->signals.destroy, surface);
wl_resource_destroy(resource);
}
@@ -104,6 +102,7 @@ static void destroy_surface(struct wl_resource *resource) {
struct wlr_surface *surface = wl_resource_get_user_data(resource);
wl_signal_emit(&surface->signals.destroy, surface);
wlr_texture_destroy(surface->texture);
+ free(surface);
}
struct wlr_surface *wlr_surface_create(struct wl_resource *res,