Skip to content

Commit

Permalink
Return instead of warnings with NULL callback
Browse files Browse the repository at this point in the history
Fixes #478
  • Loading branch information
bluca committed Sep 4, 2024
1 parent 4a31c98 commit f4f48f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/polkitbackend/polkitbackendsessionmonitor-systemd.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ sd_source_dispatch (GSource *source,
SdSource *sd_source = (SdSource *)source;
gboolean ret;

g_warn_if_fail (callback != NULL);
if (callback == NULL)
return G_SOURCE_CONTINUE;

ret = (*callback) (user_data);

Expand Down

0 comments on commit f4f48f4

Please sign in to comment.