Skip to content

Commit

Permalink
callbacks: check the mpd_connection_clear_error() return value
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 10, 2024
1 parent 22a3edb commit 37707b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/callbacks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ mpdclient_auth_callback(struct mpdclient *c) noexcept
if (connection == nullptr)
return false;

mpd_connection_clear_error(connection);
if (!mpd_connection_clear_error(connection))
return false;

const auto password = screen_read_password(*screen, nullptr);
if (password.empty())
Expand Down

0 comments on commit 37707b5

Please sign in to comment.