Skip to content

Commit

Permalink
Fix crash because of NullPointerException. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Lindsay-Needs-Sleep committed Oct 16, 2019
1 parent 6dd8907 commit de16c09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/android/ChromecastUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,10 @@ static JSONObject createMetadataObject(MediaMetadata metadata) {
return out;
}

static JSONObject createTextTrackObject(TextTrackStyle textTrackStyle) {
private static JSONObject createTextTrackObject(TextTrackStyle textTrackStyle) {
if (textTrackStyle == null) {
return null;
}
JSONObject out = new JSONObject();
try {
out.put("backgroundColor", getHexColor(textTrackStyle.getBackgroundColor()));
Expand Down

0 comments on commit de16c09

Please sign in to comment.