From e2fe8e0ecb7acb156d252825886cbf26f6ad35dc Mon Sep 17 00:00:00 2001 From: carlh Date: Sun, 10 Jul 2011 21:50:00 +0000 Subject: [PATCH] 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: http://subversion.ardour.org/svn/ardour2/ardour2/branches/3.0@9833 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/utils.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index e1cd35398..4b7fdc2f9 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())); } -- 2.11.4.GIT