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 nullptr exception #1355

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Conversation

tdrwenski
Copy link
Contributor

Description of Changes

NcML aggregations are calling UrlNaming.resolveFile with the dataset URL as the baseDir and the netcdf location as the filepath. This is causing a nullptr exception in the MFileOS::getParent call when the dataset URL does not have any slashes so the parent is null. Maybe this function should not be called at all in this case (the URL is not a baseDir so it is a bit weird), but in any case this nullptr exception should be fixed. This PR fixes the nullptr exception in MFileOS and adds unit tests.

@tdrwenski tdrwenski marked this pull request as ready for review June 12, 2024 21:16
@haileyajohnson haileyajohnson merged commit 98545e9 into Unidata:maint-5.x Jun 13, 2024
10 checks passed
@tdrwenski tdrwenski deleted the fix-nullptr-in-agg branch June 13, 2024 15:24
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.

2 participants