Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Do not access members after calling ClearDartWrapper #20465

Merged
merged 1 commit into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ui/painting/canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ void Canvas::drawShadow(const CanvasPath* path,
}

void Canvas::Invalidate() {
canvas_ = nullptr;
if (dart_wrapper()) {
ClearDartWrapper();
}
canvas_ = nullptr;
}

} // namespace flutter
2 changes: 1 addition & 1 deletion lib/ui/painting/image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/painting/picture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Dart_Handle Picture::toImage(uint32_t width,
}

void Picture::dispose() {
ClearDartWrapper();
picture_.reset();
ClearDartWrapper();
}

size_t Picture::GetAllocationSize() const {
Expand Down