Unified · Split
| @@ -285,10 +285,14 @@ impl FollowableItem for ChannelView { · 284 unmodified lines | ||
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | fn to_state_proto(&self, cx: &AppContext) -> Option<proto::view::Variant> { |
| 288 | − let channel = self.channel_buffer.read(cx).channel(); | |
| 288 | + let channel_buffer = self.channel_buffer.read(cx); | |
| 289 | + if !channel_buffer.is_connected() { | |
| 290 | + return None; | |
| 291 | + } | |
| 292 | + | |
| 289 | 293 | Some(proto::view::Variant::ChannelView( |
| 290 | 294 | proto::view::ChannelView { |
| 291 | − channel_id: channel.id, | |
| 295 | + channel_id: channel_buffer.channel().id, | |
| 292 | 296 | editor: if let Some(proto::view::Variant::Editor(proto)) = |
| 293 | 297 | self.editor.read(cx).to_state_proto(cx) |
| 294 | 298 | { |