mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-07 14:06:00 +01:00
Free screenshot state
This commit is contained in:
parent
ecd5263d4d
commit
4374c52135
1 changed files with 5 additions and 3 deletions
|
@ -43,7 +43,7 @@ static void output_frame_notify(struct wl_listener *listener, void *_data) {
|
||||||
|
|
||||||
orbital_screenshot_send_done(state->screenshot->resource);
|
orbital_screenshot_send_done(state->screenshot->resource);
|
||||||
|
|
||||||
// TODO: free(state)
|
free(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void screenshooter_shoot(struct wl_client *client,
|
static void screenshooter_shoot(struct wl_client *client,
|
||||||
|
@ -69,8 +69,10 @@ static void screenshooter_shoot(struct wl_client *client,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_screenshot *screenshot;
|
struct wlr_screenshot *screenshot =
|
||||||
if (!(screenshot = calloc(1, sizeof(struct wlr_screenshot)))) {
|
calloc(1, sizeof(struct wlr_screenshot));
|
||||||
|
if (!screenshot) {
|
||||||
|
wl_client_post_no_memory(client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
screenshot->output = _output;
|
screenshot->output = _output;
|
||||||
|
|
Loading…
Reference in a new issue