From 12bf39e93c21e07ac5c68019db607ebd6f46f1c3 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Tue, 11 Aug 2009 15:17:21 +0000 Subject: [PATCH] - send remove phone button only when button has been added to toolbar git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@2165 af16638f-c34d-0410-8cfa-b39d5352b314 --- .../phone/maps/PhoneLocalEventMapDelegate.as | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/PhoneLocalEventMapDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/PhoneLocalEventMapDelegate.as index 0cad3ece02..f5acfeb3da 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/PhoneLocalEventMapDelegate.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/maps/PhoneLocalEventMapDelegate.as @@ -61,12 +61,15 @@ package org.bigbluebutton.modules.phone.maps } public function removeToolbarButton():void { - var event:RemoveToolbarButtonEvent = new RemoveToolbarButtonEvent(RemoveToolbarButtonEvent.REMOVE_TOOLBAR_BUTTON_EVENT); - event.button = phoneButton; - trace("Dispatching REMOVE TOOLBAR BUTTON EVENT"); - globalDispatcher.dispatchEvent(event); - - buttonOpen = false; + if (buttonOpen) { + var event:RemoveToolbarButtonEvent = new RemoveToolbarButtonEvent(RemoveToolbarButtonEvent.REMOVE_TOOLBAR_BUTTON_EVENT); + event.button = phoneButton; + trace("Dispatching REMOVE TOOLBAR BUTTON EVENT"); + globalDispatcher.dispatchEvent(event); + + buttonOpen = false; + } + } public function disableToolbarButton():void {