diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java index f070c30fb..5a9667e8b 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java @@ -307,9 +307,8 @@ public void closeWindow(@NonNull WindowWidget aWindow) { placeWindow(leftWindow, WindowPlacement.FRONT); } - frontWindow = getFrontWindow(); - if (mFocusedWindow == frontWindow && !getCurrentWindows().isEmpty() && frontWindow != null) { - focusWindow(frontWindow); + if (mFocusedWindow == frontWindow && !getCurrentWindows().isEmpty() && getFrontWindow() != null) { + focusWindow(getFrontWindow()); } }