Well, if (inst.linkedEnt != NULL) crashes that means inst is a vagabonding pointer. You're of course right that the NULL check before that line is sufficient.

A remark concerning newInstance: When you use malloc you have to manually zero out the newly allocated memory. I'd suggest using sys_malloc instead which does this work for you already and uses the engines native memory managment...


Always learn from history, to be sure you make the same mistakes again...