Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Fixed a crash when the eventSink is called on a null object in the vi…
Browse files Browse the repository at this point in the history
…deo_player.
  • Loading branch information
quentinleguennec committed May 10, 2018
1 parent 057a07d commit f5a24bc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ public void onBufferingUpdate(MediaPlayer mediaPlayer, int percent) {
new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
eventSink.error(
"VideoError", "Video player had error " + what + " extra " + extra, null);
if (eventSink != null) {
eventSink.error(
"VideoError", "Video player had error " + what + " extra " + extra, null);
}
return true;
}
});
Expand Down

0 comments on commit f5a24bc

Please sign in to comment.