Skip to content

Commit

Permalink
Don't unref handled messages
Browse files Browse the repository at this point in the history
I chased this thing for ages. It looks like dbus unrefs the handled
message by itelf, because if I do it myself everything explodes. This is
completely undocumented, supposing it's even what's happening. WTF
  • Loading branch information
Riteo committed Sep 9, 2024
1 parent a8d1c2e commit 37d47ea
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions platform/linuxbsd/freedesktop_portal_desktop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ DBusHandlerResult FreeDesktopPortalDesktop::_handle_message(DBusConnection *conn

if (name_space == "org.freedesktop.appearance" && key == "color-scheme") {
callable_mp(portal, &FreeDesktopPortalDesktop::_system_theme_changed_callback).call_deferred();
dbus_message_unref(message);
return DBUS_HANDLER_RESULT_HANDLED;
}
}
Expand Down Expand Up @@ -647,8 +646,6 @@ DBusHandlerResult FreeDesktopPortalDesktop::_handle_message(DBusConnection *conn
break;
}
}

dbus_message_unref(message);
return DBUS_HANDLER_RESULT_HANDLED;
}

Expand Down

0 comments on commit 37d47ea

Please sign in to comment.