mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-21 18:54:13 +00:00
tests: assert that capture info was received before trying screenshot
If the source is not supported, we won't receive the capture information. So the capture info (size/format) will be zeroed, and we fail while trying to create a buffer for the screenshot with size/format zeroed. With this patch we fail if we don't receive the capture info, what makes the failure reason more explicit. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
3226417573
commit
cf64fbe784
|
@ -1705,6 +1705,9 @@ client_capture_output(struct client *client,
|
|||
|
||||
client_roundtrip(client);
|
||||
|
||||
assert(capt.width != 0 && capt.height != 0 && capt.drm_format != 0 &&
|
||||
"capture source not available");
|
||||
|
||||
buf = create_shm_buffer(client,
|
||||
capt.width, capt.height, capt.drm_format);
|
||||
|
||||
|
|
Loading…
Reference in a new issue