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 cc1c69c9d8
commit 743af2216d

View file

@ -659,6 +659,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);