If no tabs are open, the program ends