|
|
@ -85,6 +85,7 @@ static void screenshooter_shoot(struct wl_client *client,
|
|
|
|
struct wlr_screenshot *screenshot =
|
|
|
|
struct wlr_screenshot *screenshot =
|
|
|
|
calloc(1, sizeof(struct wlr_screenshot));
|
|
|
|
calloc(1, sizeof(struct wlr_screenshot));
|
|
|
|
if (!screenshot) {
|
|
|
|
if (!screenshot) {
|
|
|
|
|
|
|
|
free(pixels);
|
|
|
|
wl_resource_post_no_memory(screenshooter_resource);
|
|
|
|
wl_resource_post_no_memory(screenshooter_resource);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -96,6 +97,7 @@ static void screenshooter_shoot(struct wl_client *client,
|
|
|
|
wl_resource_get_version(screenshooter_resource), id);
|
|
|
|
wl_resource_get_version(screenshooter_resource), id);
|
|
|
|
if (screenshot->resource == NULL) {
|
|
|
|
if (screenshot->resource == NULL) {
|
|
|
|
free(screenshot);
|
|
|
|
free(screenshot);
|
|
|
|
|
|
|
|
free(pixels);
|
|
|
|
wl_resource_post_no_memory(screenshooter_resource);
|
|
|
|
wl_resource_post_no_memory(screenshooter_resource);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -109,6 +111,7 @@ static void screenshooter_shoot(struct wl_client *client,
|
|
|
|
if (!state) {
|
|
|
|
if (!state) {
|
|
|
|
wl_resource_destroy(screenshot->resource);
|
|
|
|
wl_resource_destroy(screenshot->resource);
|
|
|
|
free(screenshot);
|
|
|
|
free(screenshot);
|
|
|
|
|
|
|
|
free(pixels);
|
|
|
|
wl_resource_post_no_memory(screenshooter_resource);
|
|
|
|
wl_resource_post_no_memory(screenshooter_resource);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|