Fix invisible issue with double-click docking

It generated silent errors because I forgot to add this check, only if
you double-clicked on a window on which that isn't supposed to do
anything. So yeah, that's fixed. Whatever, though.