What seems not quite right? The crash?

When you print something without setting it before, it is an empty pointer. It will of course crash.