clear unwrap (#8605)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-07-04 20:18:53 +08:00
committed by GitHub
parent 94addb162b
commit 86ff768241
11 changed files with 54 additions and 42 deletions

View File

@@ -1069,12 +1069,9 @@ impl FlutterHandler {
// 1. "display 1" will not send the event.
// 2. "displays 0&1" will not send the event. Because it uses texutre render for now.
if !is_sent {
self.display_rgbas
.write()
.unwrap()
.get_mut(&display)
.unwrap()
.valid = false;
if let Some(rgba_data) = self.display_rgbas.write().unwrap().get_mut(&display) {
rgba_data.valid = false;
}
}
}