summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-07-10 21:50:00 +0000
committerCarl Hetherington <carl@carlh.net>2011-07-10 21:50:00 +0000
commita7057d69650841386a4003a6616e30b6304f8dcb (patch)
tree0214a9620eb0f187d0dda6f3f055e4c1accd8b8b /libs/ardour/utils.cc
parent216ad7fe90639b55ce1cba6939942320ac8277d6 (diff)
Make an empty-string non-affirmative so that AxisView::set_marked_for_display works properly when the visible gui property does not exist.
git-svn-id: svn://localhost/ardour2/branches/3.0@9833 d708f5d6-7413-0410-9779-e7cbd77b26cf
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()));
}