Bug 1451115 Part 1: Make UpdateZoomUI not throw an exception if gBrowser is not set on window. r=mossop

MozReview-Commit-ID: 6N51Dqxt3jk

--HG--
extra : rebase_source : 55813db8d6dbab8cc53912015256714b0577db2e
This commit is contained in:
Brad Werth 2018-04-03 13:36:24 -07:00
parent 2c4a1a4fb4
commit 1de7e2d845

View File

@ -66,7 +66,7 @@ function onZoomChange(event) {
*/
function updateZoomUI(aBrowser, aAnimate = false) {
let win = aBrowser.ownerGlobal;
if (aBrowser != win.gBrowser.selectedBrowser) {
if (!win.gBrowser || win.gBrowser.selectedBrowser != aBrowser) {
return;
}