diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-19 08:02:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 08:02:31 -0400 |
commit | 33a3d8a55504e4fc17dbaa5c268435df0102033f (patch) | |
tree | 430b762f91b2d30a6b4aa65491e4c9a96dfbe37d | |
parent | adbf21eb83da23f94c3d85a584f4d1c3465aa7f4 (diff) | |
parent | ac28d701c0c06de5f319ea24eb817913a7bfe75f (diff) |
Merge pull request #1252 from emersion/fatal-unknown-buffer
buffer: disconnect clients that commit an unknown buffer type
-rw-r--r-- | types/wlr_buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/types/wlr_buffer.c b/types/wlr_buffer.c index 55ed4792..ce733f40 100644 --- a/types/wlr_buffer.c +++ b/types/wlr_buffer.c @@ -87,6 +87,10 @@ struct wlr_buffer *wlr_buffer_create(struct wlr_renderer *renderer, // the buffer yet. } else { wlr_log(WLR_ERROR, "Cannot upload texture: unknown buffer type"); + + // Instead of just logging the error, also disconnect the client with a + // fatal protocol error so that it's clear something went wrong. + wl_resource_post_error(resource, 0, "unknown buffer type"); return NULL; } |