TW-1678: segfault in ~ViewTask()
- Column::setStyle now validates column styles. - Thanks to Daniel Shahaf.
This commit is contained in:
@@ -247,6 +247,16 @@ void Column::renderHeader (
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Column::setStyle (const std::string& style)
|
||||
{
|
||||
if (style != "default" &&
|
||||
std::find (_styles.begin (), _styles.end (), style) == _styles.end ())
|
||||
throw format (STRING_COLUMN_BAD_FORMAT, _name, style);
|
||||
|
||||
_style = style;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Column::validate (std::string& input)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user