diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-14 09:13:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-14 09:13:24 -0400 |
commit | 1e1e9887fba15291256a806aca6cc6f94a8f671e (patch) | |
tree | 0b05c74f83f1bdb0956c94e6e9631584cd4f99ed | |
parent | 2facf1df65742a1f4ae6977c8a54bc14643c6c1b (diff) | |
parent | db77530a35f1adbd66f567d733b55a57a62304d8 (diff) |
Merge pull request #84 from martinetd/fixes
Fixes
-rw-r--r-- | backend/multi/backend.c | 2 | ||||
-rw-r--r-- | types/wlr_output.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/backend/multi/backend.c b/backend/multi/backend.c index 94b7dd60..9afca47d 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -112,7 +112,7 @@ static void output_remove_reemit(struct wl_listener *listener, void *data) { void wlr_multi_backend_add(struct wlr_backend *_multi, struct wlr_backend *backend) { - assert(wlr_backend_is_multi(backend)); + assert(wlr_backend_is_multi(_multi)); struct wlr_multi_backend *multi = (struct wlr_multi_backend *)_multi; struct subbackend_state *sub = calloc(1, sizeof(struct subbackend_state)); diff --git a/types/wlr_output.c b/types/wlr_output.c index 04dcbfa5..b4618194 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -178,13 +178,16 @@ void wlr_output_destroy(struct wlr_output *output) { wlr_texture_destroy(output->cursor.texture); wlr_renderer_destroy(output->cursor.renderer); - output->impl->destroy(output); for (size_t i = 0; output->modes && i < output->modes->length; ++i) { struct wlr_output_mode *mode = output->modes->items[i]; free(mode); - free(mode); } list_free(output->modes); + if (output->impl->destroy) { + output->impl->destroy(output); + } else { + free(output); + } } void wlr_output_effective_resolution(struct wlr_output *output, |