If I understood you right, the player pointer in your code was NULL and you solved this by setting it. This is certainly a correct and valid solution, however I'm not sure why you're posting this in "bugs" - what can we do to help?

Even if it might sometimes seem that goblins are changing pointers behind your back ;), I can assure you that pointers only get changed when you set them or when something happens to the object they point to. But if you have problems with an entity pointer in your code, just use the 'watched' variable for observing it.