From 0e96d84079c1792523d99b6bbec5878d11f5c8e4 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Mon, 16 Jun 2014 20:39:45 +1000 Subject: Change PBD::PathScanner API to return results by value to avoid inadvertent memory leaks --- gtk2_ardour/session_dialog.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gtk2_ardour/session_dialog.cc') diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 178fcb835c..7fb765e2bc 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -621,7 +621,7 @@ SessionDialog::redisplay_recent_sessions () get_state_files_in_directory (*i, state_file_paths); - vector* states; + vector states; vector item; string dirname = *i; @@ -639,12 +639,12 @@ SessionDialog::redisplay_recent_sessions () /* now get available states for this session */ - if ((states = Session::possible_states (dirname)) == 0) { + states = Session::possible_states (dirname); + + if (states.empty()) { /* no state file? */ continue; } - vector_delete (states); - delete (states); std::vector state_file_names(get_file_names_no_extension (state_file_paths)); -- cgit v1.2.3