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

Fix null pointer dereference in GetLocalSdkPackage #296

Closed
wants to merge 1 commit into from

Conversation

bytemain
Copy link
Member

@bytemain bytemain commented May 31, 2024

close: #295

Fixes the null pointer dereference issue in the GetLocalSdkPackage function within internal/sdk.go.

  • Adds a nil check for the main variable before attempting to access its properties. This prevents the function from panicking when main is nil, addressing the reported runtime error.
  • Modifies the error handling to return a more descriptive error message if the main SDK is not found, enhancing error clarity for debugging purposes.

For more details, open the Copilot Workspace session.

@aooohan aooohan closed this Jun 29, 2024
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.

[BUG]: panic: runtime error: invalid memory address or nil pointer dereference
2 participants