~emersion/chayang

61ad53b046562343ed062d74225299b0bc48b6a1 — Simon Ser 1 year, 5 months ago 928cb37
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.
1 files changed, 0 insertions(+), 3 deletions(-)

M main.c
M main.c => main.c +0 -3
@@ 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;