diff --git a/crates/edit_prediction_button/src/edit_prediction_button.rs b/crates/edit_prediction_button/src/edit_prediction_button.rs index 70c861ab1112630c2e3293cb54a4e96c6754b3bd..6e9000bc62eea94d5c48dca2416781f46428522c 100644 --- a/crates/edit_prediction_button/src/edit_prediction_button.rs +++ b/crates/edit_prediction_button/src/edit_prediction_button.rs @@ -379,11 +379,12 @@ impl Render for EditPredictionButton { }) }); - let this = cx.entity(); + let this = cx.weak_entity(); let mut popover_menu = PopoverMenu::new("zeta") .menu(move |window, cx| { - Some(this.update(cx, |this, cx| this.build_zeta_context_menu(window, cx))) + this.update(cx, |this, cx| this.build_zeta_context_menu(window, cx)) + .ok() }) .anchor(Corner::BottomRight) .with_handle(self.popover_menu_handle.clone());