Merge pull request #1252 from emersion/fatal-unknown-buffer

buffer: disconnect clients that commit an unknown buffer type
This commit is contained in:
Drew DeVault 2018-09-19 08:02:31 -04:00 committed by GitHub
commit 33a3d8a555
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,6 +87,10 @@ struct wlr_buffer *wlr_buffer_create(struct wlr_renderer *renderer,
// the buffer yet. // the buffer yet.
} else { } else {
wlr_log(WLR_ERROR, "Cannot upload texture: unknown buffer type"); 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; return NULL;
} }