Don't free DBusError if it was never inited because dbus_error_free() is nullptr too
@@ -467,6 +467,7 @@ void dbus_manager::init()
dbus_manager::~dbus_manager()
{
+ if (m_inited) {
// unreference system bus connection instead of closing it
if (m_dbus_conn) {
disconnect_from_signals();
@@ -475,6 +476,7 @@ dbus_manager::~dbus_manager()
}
m_dbus_ldr.error_free(&m_error);
}
+}
void dbus_manager::connect_to_signals()
{
