From e6bbbe18c6ca0a693abb65d9f13226fcf3703203 Mon Sep 17 00:00:00 2001 From: Nikolaus Gullotta Date: Mon, 8 Jun 2020 09:38:29 -0500 Subject: [PATCH] Skip recent sessions with empty strings for names This can happen if the recent sessions file has new lines with no characters on it which can be the direct loading sessions with wacky names. For example, one that has a carriage return or newline in it. --- gtk2_ardour/session_dialog.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index fd4d43d8b6..e89459cec6 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -778,6 +778,10 @@ SessionDialog::redisplay_recent_sessions () /* remove any trailing / */ + if (dirname.empty()) { + continue; + } + if (dirname[dirname.length()-1] == '/') { dirname = dirname.substr (0, dirname.length()-1); }