summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-10-01 18:46:21 +0300
committerMavridis Philippe <mavridisf@gmail.com>2024-10-01 18:46:21 +0300
commitacdd7db26e0808fc4d787fdec26e7f7479b1cb8f (patch)
treec74365be777bcf6860ddf5a3d163d831a5b2573b
parent21fbf1ce2ba0c5b54b6a07971d27265405956543 (diff)
downloadxdg-desktop-portal-tde-acdd7db26e0808fc4d787fdec26e7f7479b1cb8f.tar.gz
xdg-desktop-portal-tde-acdd7db26e0808fc4d787fdec26e7f7479b1cb8f.zip
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 <mavridisf@gmail.com>
-rw-r--r--src/portal_daemon.cpp7
1 files changed, 6 insertions, 1 deletions
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();
}