Rated 4 out of 5 stars

Just enter 'about:config' into the address bar. Filter the word 'lasttab' and you'll get this string → 'browser.tabs.closeWindowWithLastTab'. Double-click the value to toggle it to false. That's it, no need to install an extra add-on.

This review is for a previous version of the add-on (0.3.3).