]> git.mdlowis.com Git - proto/labwc.git/commit
src/output.c: ensure we don't carry around a stale output pointer
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 2 Dec 2023 14:05:26 +0000 (15:05 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 2 Dec 2023 14:27:00 +0000 (15:27 +0100)
commite841d44b6f8b1d199d78e674d7a380ee2168f2b5
tree570d54061d2f30e503275752659fd1d257bc4822
parentfcf21e1464e7dd9dc33a21c31a60d095b7f51b44
src/output.c: ensure we don't carry around a stale output pointer

Prevent carrying around the wlr_output->data pointer when
destroying an output. The set_gamma handler may be called
during the destruction of a wlr_output after our own
destroy handler has already been called. This patch resets
the wlr_output->data pointer in our destroy handler and
adds a check in the set_gamma handler to verify the output
is actually valid.

Fixes #1270

Reported-by: @Flrian
src/output.c