Deskbar: Check if window is NULL. Fixes #9860

It is possible, through the right combination of steps, for this method to
be run on startup before the view is attached to the window causing a crash
because Window() returns NULL. This fix returns false in this case instead.
Later, when an application such as Tracker is started and added to Deskbar
this method will be run again with the view attached to the window.