From cfbfa88cdc1cf5b0e83c9ec508fd0222c1df0985 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Thu, 3 Jul 2025 09:05:45 -0400 Subject: [PATCH] refactor: PortalInputCapture: do not create nested pointer in new Thread call --- src/lib/platform/PortalInputCapture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/platform/PortalInputCapture.cpp b/src/lib/platform/PortalInputCapture.cpp index ac5749fef..271d4a793 100644 --- a/src/lib/platform/PortalInputCapture.cpp +++ b/src/lib/platform/PortalInputCapture.cpp @@ -22,7 +22,9 @@ PortalInputCapture::PortalInputCapture(EiScreen *screen, IEventQueue *events) m_portal{xdp_portal_new()} { m_glibMainLoop = g_main_loop_new(nullptr, true); - m_glibThread = new Thread(new TMethodJob(this, &PortalInputCapture::glibThread)); + + auto tMethodJob = new TMethodJob(this, &PortalInputCapture::glibThread); + m_glibThread = new Thread(tMethodJob); auto captureCallback = [](gpointer data) { return static_cast(data)->initSession(); };