From 8bd7f9c72100334b1799b768db0f6fb3340d7c5f Mon Sep 17 00:00:00 2001 From: Chad Pilkey Date: Thu, 8 Feb 2018 14:26:40 -0500 Subject: [PATCH] [AIR] fix exception when trying to scroll a short chat list --- .../bigbluebutton/lib/chat/views/ChatViewMediatorBase.as | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as index ba498416a3..b7339565a3 100755 --- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as +++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/chat/views/ChatViewMediatorBase.as @@ -15,6 +15,7 @@ package org.bigbluebutton.lib.chat.views { import robotlegs.bender.bundles.mvcs.Mediator; + import spark.components.VScrollBar; import spark.core.NavigationUnit; public class ChatViewMediatorBase extends Mediator { @@ -58,7 +59,10 @@ package org.bigbluebutton.lib.chat.views { protected function onNewMessage(chatId:String):void { if (_chat && _chat.chatId == chatId) { if (view) { - view.chatList.scroller.verticalScrollBar.value = view.chatList.scroller.verticalScrollBar.maximum; + var vScrollBar:VScrollBar = view.chatList.scroller.verticalScrollBar; + if (vScrollBar) { + vScrollBar.value = vScrollBar.maximum; + } } _chat.newMessages = 0; }