mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-25 23:45:58 +01:00
screencast: use asserts for fatal errors
This commit is contained in:
parent
8f05ade2a2
commit
5eed00bb66
2 changed files with 3 additions and 8 deletions
|
@ -201,10 +201,7 @@ void xdpw_pwr_enqueue_buffer(struct xdpw_screencast_instance *cast) {
|
|||
struct pw_buffer *pw_buf = cast->current_frame.current_pw_buffer;
|
||||
bool buffer_corrupt = cast->frame_state != XDPW_FRAME_STATE_SUCCESS;
|
||||
|
||||
if (!pw_buf) {
|
||||
logprint(TRACE, "pipewire: no pipewire buffer to queue");
|
||||
return;
|
||||
}
|
||||
assert(pw_buf);
|
||||
|
||||
struct spa_buffer *spa_buf = pw_buf->buffer;
|
||||
struct spa_data *d = spa_buf->datas;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <wayland-client-protocol.h>
|
||||
|
||||
#include "screencast.h"
|
||||
|
@ -151,10 +152,7 @@ static void wlr_frame_buffer_done(void *data,
|
|||
return;
|
||||
}
|
||||
|
||||
if (cast->current_frame.buffer == NULL) {
|
||||
logprint(ERROR, "wlroots: imported buffer doesn't contain a wlr_buffer");
|
||||
abort();
|
||||
}
|
||||
assert(cast->current_frame.buffer);
|
||||
|
||||
zwlr_screencopy_frame_v1_copy_with_damage(frame, cast->current_frame.buffer);
|
||||
logprint(TRACE, "wlroots: frame copied");
|
||||
|
|
Loading…
Reference in a new issue