Fix possible dangling pointer / crash in predatorytunicate script