WebAudio
WebAudio copied to clipboard
Fix NULL error
Fixes:
lua/webaudio/receiver.lua:335: Tried to use a NULL entity!
1. WorldToLocal - [C]:-1
2. updateObject - lua/webaudio/receiver.lua:335
3. func - lua/webaudio/receiver.lua:385
4. unknown - lua/includes/extensions/net.lua:38
I never did this because it was never reproducable and couldn't think of why it'd happen.
Adding an IsValid there just feels like a hack.
https://github.com/Vurv78/WebAudio/issues/42#issue-983384217 https://github.com/Vurv78/WebAudio/issues/60
But ig I'll merge later on if you don't have anything to reproduce the issue.
An entity may become invalid while it is being transmitted to the network.
Yes, that's what you'd think. I don't remember fully since it's been so long but I'm pretty sure I'd have tested the case for that and still not have been able to reproduce it.
Something like this:
@inputs P:entity # ensure wired
const Wa = webAudio(...)
Wa:setParent(P)
Wa:transmit()
P:propDelete()
Any progress of this?
I don't think it will ever be merged.