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 Android usage of ReLinker #10068

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Conversation

blaztinn
Copy link
Contributor

Description

Add an option to pass the context when loading the native libraries and use it. This avoids the case when context is not yet saved and we fail to use relinker because of the NullPointerException.

Existing Issue(s)

#10067

When loading libraries the `SDL.mContext` is still `null`. This results in
relinker code path in `SDL.loadLibrary(...)` always throwing a null exception
and fallbacking to system loader.

Fix it by passing the context explicitly.
@slouken slouken merged commit 6a2dd96 into libsdl-org:SDL2 Jun 20, 2024
36 of 37 checks passed
@slouken
Copy link
Collaborator

slouken commented Jun 20, 2024

Merged, thanks!

@blaztinn
Copy link
Contributor Author

@slouken happy to contribute!

I see that you also cherry-picked the fix to main but it seems like you forgot to cherry pick both commits from the PR, b748a09f1a60331dd04f065ff8061799c138997a is missing on main.

@slouken
Copy link
Collaborator

slouken commented Jun 20, 2024

Fixed, thanks!

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