ErikReider / SwayAudioIdleInhibit

GNU General Public License v3.0
166 stars 15 forks source link

Fix crash due to uninitialized ignored sources outputs #24

Closed vadz closed 2 months ago

vadz commented 3 months ago

If no source outputs to ignore were specified on the command line, the array was left completely uninitialized, resulting in a crash later on while iterating over it until the first null pointer.

Fix this by ensuring that there is always a null pointer at the end.

See #18.


Without this fix the program just crashed on startup here.

Lenbok commented 2 months ago

@vadz this change was effectively incorporated in #21, so I think this PR can be closed.

vadz commented 2 months ago

Oops, sorry, I didn't notice the other PR. My change seems much simpler and more "obviously correct" to me but it's indeed probably not worth changing the code any more.