Skip to content

Check whether index exists when using EnsureEditorTabActiveVisible#1252

Merged
dzhou121 merged 1 commit intolapce:masterfrom
camc314:cam/dev/fix-editor-close-crash
Sep 18, 2022
Merged

Check whether index exists when using EnsureEditorTabActiveVisible#1252
dzhou121 merged 1 commit intolapce:masterfrom
camc314:cam/dev/fix-editor-close-crash

Conversation

@camc314
Copy link
Copy Markdown
Contributor

@camc314 camc314 commented Sep 17, 2022

Fix crash when closing editor when no tabs have unsaved changes

changes

let active = &tab.children[tab.active];

to

if let Some(active) = tab.children.get(tab.active) {

@MinusGix MinusGix added the C-crash 💥 Category: a bug that crashes Lapce label Sep 17, 2022
@dzhou121 dzhou121 merged commit dc9b0f4 into lapce:master Sep 18, 2022
@camc314 camc314 deleted the cam/dev/fix-editor-close-crash branch September 18, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-crash 💥 Category: a bug that crashes Lapce

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants