3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-02-04 14:25:28 +00:00

mainLoopExecutor: fix incorrect pipe check

This commit is contained in:
Vaxry
2026-01-05 15:04:56 +01:00
committed by Vaxry
parent 7d8f57083e
commit 1761909bca

View File

@ -11,10 +11,7 @@ static int onDataRead(int fd, uint32_t mask, void* data) {
CMainLoopExecutor::CMainLoopExecutor(std::function<void()>&& callback) : m_fn(std::move(callback)) {
int fds[2];
pipe(fds);
RASSERT(fds[0] != 0, "CMainLoopExecutor: failed to open a pipe");
RASSERT(fds[1] != 0, "CMainLoopExecutor: failed to open a pipe");
RASSERT(pipe(fds) == 0, "CMainLoopExecutor: failed to open a pipe");
m_event = wl_event_loop_add_fd(g_pEventLoopManager->m_wayland.loop, fds[0], WL_EVENT_READABLE, ::onDataRead, this);