Prevent iOS crash when disposing player before FlutterEngine is destroyed.

This commit is contained in:
Ryan Heise 2020-10-24 18:02:04 +11:00
parent 7949f92b90
commit d2de8a89f9
1 changed files with 3 additions and 1 deletions

View File

@ -1157,7 +1157,9 @@
if (_processingState != none) {
[_player pause];
_processingState = none;
[self broadcastPlaybackEvent];
// If used just before destroying the current FlutterEngine, this will result in:
// NSInternalInconsistencyException: 'Sending a message before the FlutterEngine has been run.'
//[self broadcastPlaybackEvent];
}
if (_timeObserver) {
[_player removeTimeObserver:_timeObserver];