Skip to content

Commit

Permalink
fix: android - null check on getPosterImage()
Browse files Browse the repository at this point in the history
  • Loading branch information
aleccolville committed Jul 28, 2022
1 parent efe5383 commit e3bd587
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ private void loadImage(Video video) {
this.imageView.setImageResource(android.R.color.transparent);
return;
}

if (video.getPosterImage() == null) {
this.imageView.setImageResource(android.R.color.transparent);
return;
}

String url = video.getPosterImage().toString();
if (url == null) {
this.imageView.setImageResource(android.R.color.transparent);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-brightcove-ima-player",
"version": "2.3.0",
"version": "2.3.1",
"description": "React Native implementation of Brightcove Player native SDK",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit e3bd587

Please sign in to comment.