mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 15:36:29 +01:00
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
This commit is contained in:
parent
8ca2847b42
commit
cd1ee0e172
1 changed files with 2 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue