fix: nil check in renderCalendarInvite#1023
Merged
andrinoff merged 1 commit intofloatpane:masterfrom Apr 27, 2026
Merged
Conversation
renderCalendarInvite() accessed event.Summary, event.Start, and other fields without checking if the event parameter was nil. If ParseICS() returns a successfully parsed calendar with nil event fields, this causes a panic on nil pointer dereference. Changes: - Added nil check at the top of renderCalendarInvite() - Returns empty string if event is nil, preventing panic This handles malformed ICS attachments (e.g., VEVENT with no DTSTART) gracefully instead of crashing. Fixes #883
floatpanebot
previously requested changes
Apr 26, 2026
Member
floatpanebot
left a comment
There was a problem hiding this comment.
Hi @vedparkasharya! Please fix the following issues with your PR:
- Title: Is too long (67 characters). The PR title must be strictly under 40 characters.
- Body: Missing the
## What?or## Why?headings required by the PR template.
Member
|
@vedparkasharya make the changes given by the bot. |
Contributor
Author
|
Hi @andrinoff, thanks for the reminder! I've updated the PR to address the bot's feedback:
Please let me know if anything else is needed. 👍 |
Formatting issues have been resolved. Thank you!
Contributor
Author
|
Hi @andrinoff and maintainers, I've updated the PR to address the bot's feedback:
Please let me know if anything else is needed. Thanks! |
Member
|
/approve |
floatpanebot
approved these changes
Apr 27, 2026
Member
floatpanebot
left a comment
There was a problem hiding this comment.
Approved on behalf of @LeaWhoCodes via /approve command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds a nil check on the calendar event parameter in
renderCalendarInviteto prevent potential runtime panics when the event data is unexpectedly nil.Why?
Without this check, calling
renderCalendarInvitewith a nil event could cause a crash. This fix ensures safe handling of nil calendar events, improving robustness.Fixes #883