diff --git a/Application/LinkBubble/src/main/java/com/linkbubble/MainController.java b/Application/LinkBubble/src/main/java/com/linkbubble/MainController.java index 8216f956d..4172e7653 100644 --- a/Application/LinkBubble/src/main/java/com/linkbubble/MainController.java +++ b/Application/LinkBubble/src/main/java/com/linkbubble/MainController.java @@ -967,11 +967,17 @@ public boolean closeTab(TabView tabView, Constant.BubbleAction action, boolean a // If the tab is already closing, do nothing. Otherwise we could end up in a weird state, // where we attempt to show multiple prompts and crashing upon tab restore. - if (tabView.mIsClosing == true) { + if (null == tabView || tabView.mIsClosing == true) { CrashTracking.log("Ignoring duplicate tabView close request"); return false; } - tabView.mIsClosing = true; + if (null != tabView) { + tabView.mIsClosing = true; + } + else { + CrashTracking.log("attempt to access on null tabView"); + return false; + } boolean contentViewShowing = contentViewShowing(); CrashTracking.log("MainController.closeTab(): action:" + action.toString() + ", contentViewShowing:" + contentViewShowing