mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Don't panic on unknown cursor style on x11 (#14264)
Release Notes: - linux: Fixed a panic if we request a cursor style your system doesn't support
This commit is contained in:
parent
b87d1eabcc
commit
12dfd4a2c2
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user