mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-23 23:09:42 +00:00
Remove occasionally incorrect expectation (#10358)
This panic has occured a handful of times, I think it must be the case that: 1. Item is dropped outside of an update loop 2. The next update is this one In that case no flush effects will have called the release observers yet, but we cannot upgrade the WeakModel because the ref count is 0 Release Notes: - Fixed a (rare) panic while collaborating
This commit is contained in:
parent
7abb63cfda
commit
fc10201ce2
1 changed files with 1 additions and 3 deletions
|
@ -453,9 +453,7 @@ impl<T: Item> ItemHandle for View<T> {
|
|||
}
|
||||
|
||||
workspace.update(&mut cx, |workspace, cx| {
|
||||
let item = item.upgrade().expect(
|
||||
"item to be alive, otherwise task would have been dropped",
|
||||
);
|
||||
let Some(item) = item.upgrade() else { return };
|
||||
workspace.update_followers(
|
||||
is_project_item,
|
||||
proto::update_followers::Variant::UpdateView(
|
||||
|
|
Loading…
Reference in a new issue