Changed FileMenu::save_all to avoid segfault and memory leak