Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Added check to avoid the nullpointerexception
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Dec 16, 2019
1 parent 6ba3881 commit 983720e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,10 @@ public void moveWindowLeft(@NonNull WindowWidget aWindow) {
}

public void focusWindow(@NonNull WindowWidget aWindow) {
if (aWindow != mFocusedWindow) {
if (mFocusedWindow != null && aWindow != mFocusedWindow) {
WindowWidget prev = mFocusedWindow;
mFocusedWindow = aWindow;
if (prev != null && getCurrentWindows().contains(prev)) {
if (getCurrentWindows().contains(prev)) {
prev.setActiveWindow(false);
if (prev.isVisible()) {
prev.getTitleBar().setVisible(true);
Expand Down

0 comments on commit 983720e

Please sign in to comment.