Skip to content

Commit

Permalink
client/player: Fix scan-build warning
Browse files Browse the repository at this point in the history
This fixes the following warning:

client/player.c:1775:25: warning: Dereference of null pointer
[core.NullDereference]
iov_append(&cfg->caps, preset->data.iov_base, preset->data.iov_len);
                        ^~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
Vudentz committed Nov 21, 2022
1 parent 818adf2 commit 5a872af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,9 @@ static DBusMessage *endpoint_select_properties_reply(struct endpoint *ep,
DBusMessageIter iter;
struct endpoint_config *cfg;

if (!preset)
return NULL;

reply = dbus_message_new_method_return(msg);
if (!reply)
return NULL;
Expand Down

0 comments on commit 5a872af

Please sign in to comment.