Skip to content

Fix segfault when calling P_RemoveMobj from A_BunnyHop

Hanicef requested to merge Hanicef/SRB2:fix-removemobj-seesound into next

In Lua, calling P_RemoveMobj from A_BunnyHop action triggers a segfault due to a missing P_MobjWasRemoved check. Can be easily reproduced with this script:

function A_BunnyHop(mobj)
	P_RemoveMobj(mobj)
end

EDIT: Turns out A_BunnyHop was the culprit, but the segfault actually triggered in A_PlaySeeSound.

Edited by Hanicef

Merge request reports