TW-1723: task info causes segfault

- Thanks to Roman Golovin.
- Calls like 'context.columns[name]' autovivify the key 'name' with a default
  ctor value, which ends up polluting the context.columns map with every unique
  attribute name, which is a lot of 'annotation_nnnnnnnnnn' attributes.
This commit is contained in:
Paul Beckingham
2015-11-15 12:57:26 -05:00
parent fdda485032
commit 79189c448c
4 changed files with 37 additions and 31 deletions

View File

@@ -501,10 +501,9 @@ bool Task::is_dueyear () const
bool Task::is_udaPresent () const
{
for (auto& col : context.columns)
if (col.first.compare (0, 11, "annotation_", 11) != 0)
if (col.second->is_uda () &&
has (col.first))
return true;
if (col.second->is_uda () &&
has (col.first))
return true;
return false;
}