Skip to content

Commit

Permalink
Merge pull request #124 from Korrdyn/patch-1
Browse files Browse the repository at this point in the history
fix: Fix track result null exception
  • Loading branch information
angelobreuer authored Sep 14, 2023
2 parents 6ca3c55 + a04ffc2 commit a3f5267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Lavalink4NET.Rest/Entities/Tracks/TrackLoadResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public TrackLoadResult(object? value, PlaylistInformation playlist)
public PlaylistInformation? Playlist => _playlist?.Name is not null ? _playlist : null;

[MemberNotNullWhen(true, nameof(Playlist))]
public bool IsPlaylist => _playlist.Name is not null;
public bool IsPlaylist => _playlist?.Name is not null;

[MemberNotNullWhen(true, nameof(Track))]
public bool IsSuccess => _value is LavalinkTrack[] or LavalinkTrack;
Expand Down Expand Up @@ -84,4 +84,4 @@ public static TrackLoadResult CreateError(TrackException exception)
}
}

file sealed record class ExceptionData(TrackException Exception);
file sealed record class ExceptionData(TrackException Exception);

0 comments on commit a3f5267

Please sign in to comment.