In case of empty Dart data responses, don’t call the buffer method on null. (flutter/engine#5114)
Fixes regression introduced in https://github.com/flutter/engine/pull/5101.
This commit is contained in:
@@ -729,7 +729,7 @@ class Window {
|
||||
final Zone registrationZone = Zone.current;
|
||||
|
||||
return (Uint8List data) {
|
||||
registrationZone.runUnaryGuarded(callback, data.buffer.asByteData());
|
||||
registrationZone.runUnaryGuarded(callback, data?.buffer?.asByteData());
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user