Partial fix for crash in WarpToWindow.