From 6cd27d49e5a50249d26092247b83c5042cbd070f Mon Sep 17 00:00:00 2001 From: Chad Pilkey Date: Wed, 29 Nov 2017 18:26:44 -0500 Subject: [PATCH] avoid null exceptions --- .../src/org/bigbluebutton/modules/chat/views/ChatView.mxml | 5 ++++- .../modules/screenshare/services/ScreenshareService.as | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml index 5da445cfe7..3af4691ca0 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml @@ -284,7 +284,10 @@ with BigBlueButton; if not, see . } private function getTabIndexFor(chatBox:ChatTab):int { - return chatTabs.getChildIndex(chatBox); + if (chatBox) + return chatTabs.getChildIndex(chatBox); + else + return -1; } private function onTabNavChange():void{ diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as index 185bd9240c..7cf8a147f3 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/screenshare/services/ScreenshareService.as @@ -73,7 +73,7 @@ package org.bigbluebutton.modules.screenshare.services { } public function disconnect():void { - conn.disconnect(); + if (conn) conn.disconnect(); } public function checkIfPresenterIsSharingScreen():void {