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

SCI: fix segfault upon detection of pirated game, without fallback #2036

Merged
merged 2 commits into from Feb 3, 2020

Conversation

@ZvikaZ
Copy link
Contributor

ZvikaZ commented Feb 2, 2020

Since ~2 weeks ago, when adding a pirated SCI game that has no fallback, there is a segfault.
Fixing it here.
(this is not related to my other PR, since it was introduced earlier, I just encountered it while working on the other PR ;-) )

@@ -980,8 +982,12 @@ void ResourceManager::init() {
#ifdef ENABLE_SCI32
_currentDiscNo = 1;
#endif
_patcher = new ResourcePatcher(g_sci->getGameId(), g_sci->getLanguage());
addSource(_patcher);
if(g_sci) {

This comment has been minimized.

Copy link
@bluegr

bluegr Feb 2, 2020

Member

Please fix spacing here, to conform to our coding guidelines

This comment has been minimized.

Copy link
@ZvikaZ

ZvikaZ Feb 3, 2020

Author Contributor

We're talking about the if(g_sci) that should be if (g_sci), right?
Fixed.

@bluegr

This comment has been minimized.

Copy link
Member

bluegr commented Feb 3, 2020

Thanks for your work! Squashing + merging

@bluegr bluegr merged commit 2f9f488 into scummvm:master Feb 3, 2020
2 checks passed
2 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.