diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2022-01-23 18:16:44 +0300 |
---|---|---|
committer | Tudor Brindus <vulcainus@gmail.com> | 2022-01-23 10:41:57 -0500 |
commit | cd1ee0e172a10a3f8a420ff20aa1a69d46c7b4ad (patch) | |
tree | 2d279b6ca9273b30c932420701811c47cbf3043d /swaynag | |
parent | 8ca2847b42533265cdccb78d939d00fc6a062e48 (diff) |
swaynag: remove buffer destruction condition
An address of a variable can never be NULL, so checking it doesn't make
sense; and `destroy_buffer()` can operate on already destroyed buffers
anyway.
Fixes #6780
Diffstat (limited to 'swaynag')
-rw-r--r-- | swaynag/swaynag.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c index 9b57d578..03ec0411 100644 --- a/swaynag/swaynag.c +++ b/swaynag/swaynag.c @@ -511,13 +511,8 @@ void swaynag_destroy(struct swaynag *swaynag) { swaynag_seat_destroy(seat); } - if (&swaynag->buffers[0]) { - destroy_buffer(&swaynag->buffers[0]); - } - - if (&swaynag->buffers[1]) { - destroy_buffer(&swaynag->buffers[1]); - } + destroy_buffer(&swaynag->buffers[0]); + destroy_buffer(&swaynag->buffers[1]); if (swaynag->outputs.prev || swaynag->outputs.next) { struct swaynag_output *output, *temp; |