From acdd7db26e0808fc4d787fdec26e7f7479b1cb8f Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Tue, 1 Oct 2024 18:46:21 +0300 Subject: [PATCH] Initialize DBus object pointers with nullptr This should fix a crash when the daemon is terminated before it can establish connection and initialize the objects. Signed-off-by: Mavridis Philippe --- src/portal_daemon.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/portal_daemon.cpp b/src/portal_daemon.cpp index cc8615f..f533791 100644 --- a/src/portal_daemon.cpp +++ b/src/portal_daemon.cpp @@ -34,7 +34,12 @@ PortalDaemon::PortalDaemon() : KUniqueApplication(), - m_retryCount(0) + m_retryCount(0), + d_root(nullptr), + d_org(nullptr), + d_freedesktop(nullptr), + d_portal(nullptr), + d_desktop(nullptr) { connectDBus(); }