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(state/scripting): fixes player natives trying to reference non-existent player entity #2756

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

AvarianKnight
Copy link
Contributor

@AvarianKnight AvarianKnight commented Aug 28, 2024

Goal of this PR

Fix the server crashing if the player entity doesn't exist when the native is called

How is this PR achieving the goal

Using the proper MakePlayerEntityFunction wrapper that checks if the entity exist before calling the function

This PR applies to the following area(s)

Server

Successfully tested on

Platforms: Windows, Linux

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.

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Aug 28, 2024
Copy link
Contributor

@Nobelium-cfx Nobelium-cfx left a comment

Choose a reason for hiding this comment

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

LGTM

@Nobelium-cfx Nobelium-cfx added enhancement Feature or other request that adds functionality or improved usability ready-to-merge This PR is enqueued for merging and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Sep 3, 2024
@prikolium-cfx prikolium-cfx merged commit d2f03cf into citizenfx:master Sep 9, 2024
4 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature or other request that adds functionality or improved usability ready-to-merge This PR is enqueued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants