Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check array is non-empty before referencing 0th element #2854

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

philrz
Copy link
Contributor

@philrz philrz commented Oct 4, 2023

A console debug message indicated that when the crash in #2853 was occurring, the d value returned from chrono.casual.parse() was the empty array []. As shown in the attached video based on this branch, it therefore looks like just checking that this array is non-empty is enough to avoid the crash.

Fixed.mp4

Fixes #2853

@philrz philrz requested a review from jameskerr October 4, 2023 18:57
@philrz philrz self-assigned this Oct 4, 2023
Copy link
Member

@jameskerr jameskerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Phil!

@philrz philrz merged commit 9c77e24 into main Oct 4, 2023
3 checks passed
@philrz philrz deleted the philrz/issue2853 branch October 4, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when editing "month" portion of time range pin
2 participants