zerospades icon indicating copy to clipboard operation
zerospades copied to clipboard

Fix: Prevent null pointer dereference in Weapon::FrameNext

Open DealsBeam opened this issue 2 months ago • 0 comments

In Weapon::FrameNext, the code directly calls a method on the pointer returned by world.GetListener() without first checking if the pointer is null. In scenarios where a listener is not present (like in a unit test), this will cause a segmentation fault.

This commit adds a null check to ensure the listener exists before attempting to call PlayerEjectedBrass on it.

DealsBeam avatar Nov 02 '25 13:11 DealsBeam