Add an explicit null check to DartConverterWrappable::FromDart (flutter/engine#33188)
This commit is contained in:
@@ -89,6 +89,9 @@ Dart_PersistentHandle DartWrappable::GetTypeForWrapper(
|
||||
}
|
||||
|
||||
DartWrappable* DartConverterWrappable::FromDart(Dart_Handle handle) {
|
||||
if (Dart_IsNull(handle)) {
|
||||
return nullptr;
|
||||
}
|
||||
intptr_t peer = 0;
|
||||
Dart_Handle result =
|
||||
Dart_GetNativeInstanceField(handle, DartWrappable::kPeerIndex, &peer);
|
||||
|
||||
Reference in New Issue
Block a user