zerospades
zerospades copied to clipboard
Fix: Prevent null pointer dereference in Weapon::FrameNext
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.