Bug 1018904: Check we can remove a tab before trying to remove it in Marionette; r=mdas

This commit is contained in:
David Burns 2014-08-08 21:32:20 +01:00
parent e32efe6cd9
commit b3815cb35b

View File

@ -2641,7 +2641,9 @@ BrowserObj.prototype = {
* Closes current tab
*/
closeTab: function BO_closeTab() {
if (this.tab != null && (appName != "B2G")) {
if (this.browser &&
this.browser.removeTab &&
this.tab != null && (appName != "B2G")) {
this.browser.removeTab(this.tab);
this.tab = null;
}