summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r--libs/ardour/utils.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index e1cd35398b..4b7fdc2f91 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -561,6 +561,10 @@ string_is_affirmative (const std::string& str)
{
/* to be used only with XML data - not intended to handle user input */
+ if (str.empty ()) {
+ return false;
+ }
+
return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length()));
}