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 segfault when passing invalid arguments #13304

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

JoshuaVandaele
Copy link
Contributor

This is an issue I noticed while working on #13288.

image

@BhaaLseN
Copy link
Member

That seems weird. The Init call is unconditional on top level, so the Shutdown should symmetrically be unconditional too.
What part of Shutdown is it segfaulting on?

@JoshuaVandaele
Copy link
Contributor Author

UICommon::Shutdown segfaults when GCAdapter::Shutdown calls s_libusb_context->IsValid(), I think because InitControllers is not called until we reach MainWindow

@BhaaLseN
Copy link
Member

How about testing s_libusb_context before use in GCAdapter::Shutdown instead, then? I'm not too familiar with the adapter code, but it feels weird to move a seemingly unrelated call around. And it might even hide a different bug that we just happened to avoid so far.

@AdmiralCurtiss AdmiralCurtiss merged commit 0b7f954 into dolphin-emu:master Jan 28, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants