Fix crash when ExportDialog is hidden
authorTim Mayberry <mojofunk@gmail.com>
Sat, 17 Sep 2016 09:20:06 +0000 (19:20 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Sat, 17 Sep 2016 12:03:16 +0000 (22:03 +1000)
The issue is that when ExportDialog is destroyed
ExportFileNotebook::FilePage::on_hide is called which in turn calls
ExportProfileManager::save_format_to_disk() in order to save changes to the
analysis and soundcloud upload checkboxes. This then causes the
ExportProfileManager::FormatListChanged signal to be emitted, which in all
other cases is emitted when the format list is modified so that the GUI can
rebuild the format selector menu in ExportFormatSelector::update_format_list
when a format is added or removed.

The problem when doing this in the destructor is that some of the widgets have
already been destroyed, specifically the issue was in
ExportFileNotebook::update_soundcloud_upload trying to access the
soundcloud_selector member that had already had its destructor called.

As it is not necessary to call this signal in the first place and it just
causes unnecessary GUI updates remove the signal emission.

libs/ardour/export_profile_manager.cc

index 4eb2e62b0b294a07c39595045a21d3c7a2b36d0b..94099faa262aa367d39b1a89da541e5902e4feba 100644 (file)
@@ -633,7 +633,6 @@ ExportProfileManager::save_format_to_disk (ExportFormatSpecPtr format)
                tree.write();
        }
 
-       FormatListChanged ();
        return new_path;
 }