Drop unnecessary NULL check in frame_callback_handle_done()

After wl_callback_destroy() is called, frame_callback_handle_done()
is guaranteed to never be called by libwayland: the done event will
be silently dropped instead.
This commit is contained in:
Simon Ser 2023-02-09 11:52:53 +01:00
parent 928cb37f9a
commit 61ad53b046

3
main.c
View file

@ -32,9 +32,6 @@ static void cancel(struct chayang *state) {
static void frame_callback_handle_done(void *data, struct wl_callback *callback, uint32_t time) {
struct chayang_output *output = data;
if (callback == NULL) {
return;
}
assert(callback == output->frame_callback);
wl_callback_destroy(callback);
output->frame_callback = NULL;