mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Do not access members after calling ClearDartWrapper (flutter/engine#20465)
This commit is contained in:
parent
90ec5ff7d2
commit
a67e03a61c
@ -486,10 +486,10 @@ void Canvas::drawShadow(const CanvasPath* path,
|
||||
}
|
||||
|
||||
void Canvas::Invalidate() {
|
||||
canvas_ = nullptr;
|
||||
if (dart_wrapper()) {
|
||||
ClearDartWrapper();
|
||||
}
|
||||
canvas_ = nullptr;
|
||||
}
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
@ -37,8 +37,8 @@ Dart_Handle CanvasImage::toByteData(int format, Dart_Handle callback) {
|
||||
}
|
||||
|
||||
void CanvasImage::dispose() {
|
||||
ClearDartWrapper();
|
||||
image_.reset();
|
||||
ClearDartWrapper();
|
||||
}
|
||||
|
||||
size_t CanvasImage::GetAllocationSize() const {
|
||||
|
||||
@ -56,8 +56,8 @@ Dart_Handle Picture::toImage(uint32_t width,
|
||||
}
|
||||
|
||||
void Picture::dispose() {
|
||||
ClearDartWrapper();
|
||||
picture_.reset();
|
||||
ClearDartWrapper();
|
||||
}
|
||||
|
||||
size_t Picture::GetAllocationSize() const {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user