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: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/d94a17c8fc24fd21aeac4e1454ede2328e38116f/browser.js/clean/browser/base/content/browser.js