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:
Chinmay Garde
2018-04-27 15:22:16 -07:00
committed by GitHub
parent cb6fa1def5
commit bdaa00232e

View File

@@ -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());
};
}
}