Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
testing:hw
:
lge
:
hammerhead
>
kf5bluezqt
> _service:tar_git:0010-Fix-crash-after-unloading-the-obex-manager.-Fixes-JB.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0010-Fix-crash-after-unloading-the-obex-manager.-Fixes-JB.patch of Package kf5bluezqt
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Pekka Vuorela <pekka.vuorela@jolla.com> Date: Wed, 12 Jan 2022 15:11:44 +0200 Subject: [PATCH] Fix crash after unloading the obex manager. Fixes JB#38409 Disconnect from the interfaces added signal when the obex manager interface is destroyed. Otherwise you'll get multiple connections when it is loaded again and worse if the signal is received when unloaded the interfacesAdded slot will try and dereference a null pointer. --- src/obexmanager_p.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/obexmanager_p.cpp b/src/obexmanager_p.cpp index 089f512..9a2158c 100644 --- a/src/obexmanager_p.cpp +++ b/src/obexmanager_p.cpp @@ -227,6 +227,13 @@ void ObexManagerPrivate::clear() if (m_dbusObjectManager) { m_dbusObjectManager->deleteLater(); m_dbusObjectManager = nullptr; + + DBusConnection::orgBluezObex().disconnect(Strings::orgBluezObex(), + QStringLiteral("/"), + QStringLiteral("org.freedesktop.DBus.ObjectManager"), + QStringLiteral("InterfacesAdded"), + this, + SLOT(interfacesAddedSlot(QDBusObjectPath))); } #else if (m_bluez4) { -- 2.33.1