The my pointer should be avaiable in the material event function, so it normally should work. I guess it's an engine bug, try posting it in the bug forum.