Skip to content

Commit

Permalink
Nullcheck the getTimelineRaw call
Browse files Browse the repository at this point in the history
  • Loading branch information
stelar7 committed Sep 28, 2021
1 parent ea86e82 commit 17bf062
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,24 @@ public TimelineBuilder withPlatform(RegionShard platform)

public LOLTimeline getTimeline()
{
return getTimelineRAW().asLOLTimeline();
GAMHSMatch rawMatch = getTimelineRAW();

if (rawMatch == null) {
return null;
}

return rawMatch.asLOLTimeline();
}

public LOLMetadata getMetadata()
{
return getTimelineRAW().asLOLMatchMetadata();
GAMHSMatch rawMatch = getTimelineRAW();

if (rawMatch == null) {
return null;
}

return rawMatch.asLOLMatchMetadata();
}

public GAMHSMatch getTimelineRAW()
Expand Down

0 comments on commit 17bf062

Please sign in to comment.