the above code works fine for me. check if the 'my' pointer is valid...