Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add null check for moveFunction to prevent crashes (#3213)
This adds a null check for the moveFunction in the MoveEvent::fireAddRemItem method. Previously, the code accessed moveFunction directly without verifying its validity, which could lead to crashes if it was nullptr. The fix ensures stability by: Logging an error message when moveFunction is null. Returning early to prevent further execution with an invalid function pointer. This change improves the reliability of the function, particularly in scenarios where moveFunction might not be properly initialized.
- Loading branch information