Skip to content

Commit

Permalink
Fix NPE when live tv program is null
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Sep 24, 2022
1 parent 03856f7 commit 2277bb7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void onError(Exception exception) {
@Override
public void onResponse(ChannelInfoDto response) {
// get current program info and fill it into our item
org.jellyfin.sdk.model.api.BaseItemDto program = ModelCompat.asSdk(response.getCurrentProgram());
org.jellyfin.sdk.model.api.BaseItemDto program = response.getCurrentProgram() != null ? ModelCompat.asSdk(response.getCurrentProgram()) : null;
org.jellyfin.sdk.model.api.BaseItemDto item = mainItem;
if (program != null) {
item = JavaCompat.copyWithDates(
Expand Down

0 comments on commit 2277bb7

Please sign in to comment.