add: if (ss.getClosedTabCount(window) == 0) return; 
context: function undoCloseTab(aIndex) {  var ss = Cc["@mozilla.org/browser/sessionstore;1"].           getService(Ci.nsISessionStore);  ss.undoCloseTab(window, aIndex || 0);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/09945caafb5ca7e07fd52e34b6ec33811dcd7277/browser.js/clean/browser/base/content/browser.js