wlr_output: Don't allow commits changing render format without a buffer

This commit is contained in:
Alexander Orzechowski 2023-12-06 02:22:35 -05:00
parent 3f0a10bad0
commit 3ae9c80ddf

View file

@ -621,6 +621,12 @@ static bool output_basic_test(struct wlr_output *output,
}
}
if ((state->committed & WLR_OUTPUT_STATE_RENDER_FORMAT) &&
(state->committed & WLR_OUTPUT_STATE_BUFFER) == 0) {
wlr_log(WLR_DEBUG, "Tried to change the render format without a buffer.");
return false;
}
if (state->committed & WLR_OUTPUT_STATE_RENDER_FORMAT) {
struct wlr_allocator *allocator = output->allocator;
assert(allocator != NULL);