mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add an explicit null check to DartConverterWrappable::FromDart (flutter/engine#33188)
This commit is contained in:
parent
d7e91ac494
commit
b36737f3ce
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user