This commit is contained in:
gorhill 2015-06-25 09:05:24 -04:00
parent 1ba7894a29
commit 0afbb98f42
1 changed files with 6 additions and 0 deletions

View File

@ -908,6 +908,12 @@ var tabWatcher = (function() {
var currentBrowser = function() {
var win = Services.wm.getMostRecentWindow('navigator:browser');
// https://github.com/gorhill/uBlock/issues/399
// getTabBrowser() can return null at browser launch time.
var tabBrowser = getTabBrowser(win);
if ( tabBrowser === null ) {
return null;
}
return browserFromTarget(getTabBrowser(win).selectedTab);
};