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(citizen-script-lua): Fix crash with nil value as name in CreateTh… #3077

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

niekschoemaker
Copy link
Contributor

@niekschoemaker niekschoemaker commented Jan 18, 2025

Goal of this PR

Fix a crash that happens when a nil value is passed to Citizen.CreateThreadNow as the name.

How is this PR achieving the goal

It checks to see if lua_tostring returns a null pointer and if it does leaves the name empty.

This PR applies to the following area(s)

ScRT: LUA

Successfully tested on

Game builds: 12206

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels Jan 18, 2025
@niekschoemaker niekschoemaker force-pushed the fix-crash-create-thread-now branch from ba5772d to 6c6a362 Compare January 22, 2025 16:39
@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action invalid Requires changes before it's considered valid and can be (re)triaged and removed invalid Requires changes before it's considered valid and can be (re)triaged triage Needs a preliminary assessment to determine the urgency and required action labels Jan 22, 2025
@niekschoemaker niekschoemaker force-pushed the fix-crash-create-thread-now branch from 7c39543 to 6c6a362 Compare January 22, 2025 16:43
@niekschoemaker
Copy link
Contributor Author

Tried to merge, but merge commits aren't allowed by title, so I undid those changes, that's the mess with forced pushes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Requires changes before it's considered valid and can be (re)triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant