Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Don't panic on unknown cursor style on x11 (#14264)

Conrad Irwin12dfd4a2c265
diff --git a/crates/gpui/src/platform/linux/x11/client.rs b/crates/gpui/src/platform/linux/x11/client.rs
index 38e17778c82..22197f2c9e1 100644
--- a/crates/gpui/src/platform/linux/x11/client.rs
+++ b/crates/gpui/src/platform/linux/x11/client.rs
@@ -1169,10 +1169,13 @@ impl LinuxClient for X11Client {
let cursor = match state.cursor_cache.get(&style) {
Some(cursor) => *cursor,
None => {
- let cursor = state
+ let Some(cursor) = state
.cursor_handle
.load_cursor(&state.xcb_connection, &style.to_icon_name())
- .expect("failed to load cursor");
+ .log_err()
+ else {
+ return;
+ };
state.cursor_cache.insert(style, cursor);
cursor
}