mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-08 13:29:45 -05:00
impl->destroy cleanup:
- remove trivial destroy() function - make sure we check impl and impl->destroy before calling - always call free if not implemented
This commit is contained in:
parent
ba20d5b3ca
commit
4bbf718e7d
6 changed files with 11 additions and 10 deletions
|
|
@ -183,7 +183,7 @@ void wlr_output_destroy(struct wlr_output *output) {
|
|||
free(mode);
|
||||
}
|
||||
list_free(output->modes);
|
||||
if (output->impl->destroy) {
|
||||
if (output->impl && output->impl->destroy) {
|
||||
output->impl->destroy(output);
|
||||
} else {
|
||||
free(output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue