get_window hunt - do not let get_window a chance to segfault

"if get_window" , to check is the window is in 'achieved' state.
This 'hunt' come from the "0.64.0 New Keyframe crash" .
(could be also named "get window optimization" for window variable usage in place of multiple get_window)