Skip to content

backend: Prevent usage of NULL

Ondrej Holy requested to merge wip/oholy/flatpak-assertions into master

g_dbus_connection_get_peer_credentials may fail in some cases, see the documentation, and thus we have to check the return value before use in order to prevent warnings like the following:

g_credentials_get_unix_pid: assertion 'G_IS_CREDENTIALS (credentials)' failed

Print simply -1 if pid can't be obtained this way.

Merge request reports