mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Defensively handle case of VMservice message that has no id. (#8587)
This commit is contained in:
parent
44dbecc6be
commit
b7f00a643d
@ -83,6 +83,10 @@ abstract class _Message implements Comparable<_Message> {
|
||||
|
||||
@override
|
||||
int compareTo(_Message other) {
|
||||
if (id == null) {
|
||||
printError('Invalid VMService message data detected: $data');
|
||||
return -1;
|
||||
}
|
||||
final int result = id.compareTo(other.id);
|
||||
if (result != 0) {
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user