Commit fffbf6e9 authored by Matt Perry's avatar Matt Perry

Fix OverlayEntry.remove to work even after the Overlay is disposed. (#3412)

parent 9aeeb158
......@@ -215,9 +215,9 @@ class OverlayState extends State<Overlay> {
}
void _remove(OverlayEntry entry) {
setState(() {
_entries.remove(entry);
});
_entries.remove(entry);
if (mounted)
setState(() { /* entry was removed */ });
}
/// (DEBUG ONLY) Check whether a given entry is visible (i.e., not behind an opaque entry).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment