osx: fix bitcoin-qt startup crash when clicking dock icon

Crash probably introduced by 4d17a1b0.
Inialize the window to NULL and verify it before use.