diff --git a/libappfuse/FuseBridgeLoop.cc b/libappfuse/FuseBridgeLoop.cc index ac94e6917..f1ca4463e 100644 --- a/libappfuse/FuseBridgeLoop.cc +++ b/libappfuse/FuseBridgeLoop.cc @@ -353,8 +353,8 @@ bool FuseBridgeLoop::ProcessEventLocked(const std::unordered_setIsClosing()) { const int mount_id = entry->mount_id(); - callback->OnClosed(mount_id); bridges_.erase(mount_id); + callback->OnClosed(mount_id); if (bridges_.size() == 0) { // All bridges are now closed. return false;