agent_ui: Fix panic on editor changes in inline_assistant (#38303)

Fixes ZED-13P

Release Notes:

- N/A
This commit is contained in:
Lukas Wirth
2025-09-17 08:39:24 +00:00
committed by GitHub
parent 531f9ee236
commit a2de91827d
2 changed files with 17 additions and 21 deletions
+5 -2
View File
@@ -167,11 +167,14 @@ impl MetalAtlasState {
if let Some(ix) = index {
texture_list.textures[ix] = Some(atlas_texture);
texture_list.textures.get_mut(ix).unwrap().as_mut().unwrap()
texture_list.textures.get_mut(ix)
} else {
texture_list.textures.push(Some(atlas_texture));
texture_list.textures.last_mut().unwrap().as_mut().unwrap()
texture_list.textures.last_mut()
}
.unwrap()
.as_mut()
.unwrap()
}
fn texture(&self, id: AtlasTextureId) -> &MetalAtlasTexture {