fix: init optional to null

pull/2090/head
Alex 2023-04-03 09:38:12 +02:00
parent 20a8039a25
commit 02b3c125a1
1 changed files with 4 additions and 0 deletions

View File

@ -240,6 +240,10 @@ auto Mpris::getPlayerInfo() -> std::optional<PlayerInfo> {
.name = player_name,
.status = player_playback_status,
.status_string = player_status,
.artist = std::nullopt,
.album = std::nullopt,
.title = std::nullopt,
.length = std::nullopt,
};
if (auto artist_ = playerctl_player_get_artist(player, &error)) {