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: Avoid crash when fetching wrong bus or vca #279

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

piiertho
Copy link
Member

This avoid crash when fetching wrong bus or vca.

@piiertho piiertho requested review from bitbrain and CedNaru November 14, 2024 17:38
@piiertho piiertho self-assigned this Nov 14, 2024
@piiertho piiertho force-pushed the bugfix/avoid-crash-when-fetching-wrong-bus-or-vca branch from 840a209 to 7643e4e Compare November 14, 2024 17:40
@CedNaru CedNaru self-requested a review November 14, 2024 18:09
}

Ref<FmodVCA> FmodCache::get_vca(const String& vcaPath) {
return vcas.get(strings_to_guid.get(vcaPath));
return get_vca(strings_to_guid.get(vcaPath));
Copy link
Member

@CedNaru CedNaru Nov 14, 2024

Choose a reason for hiding this comment

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

Don't you need to check if the string has a matching guid as well ? Otherwise, you will end up with the same kind of crash the guid function had.

Copy link
Member Author

Choose a reason for hiding this comment

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

true

@CedNaru CedNaru self-requested a review November 14, 2024 18:10
@piiertho piiertho force-pushed the bugfix/avoid-crash-when-fetching-wrong-bus-or-vca branch from 7643e4e to 1589b5f Compare November 14, 2024 18:15
@piiertho piiertho merged commit 134b081 into master Nov 14, 2024
15 checks passed
@piiertho piiertho deleted the bugfix/avoid-crash-when-fetching-wrong-bus-or-vca branch November 14, 2024 18:52
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