the code I gave you would help you out in determining the problem because it should help only executing code when the entity pointer's empty/exist ..
since you only provided the code that "is not the problem" , there is nothing to find in it which "is the problem" from our side , therefore the most logical effort I could give , I already gave ..
if you want help , you must try narrowing it down to where the problem is , and provide that also .
jb
Last edited by Wjbender; 02/20/15 15:06.