Skip to content
Snippets Groups Projects
Commit a2d8d416 authored by Joachim Pouderoux's avatar Joachim Pouderoux
Browse files

Fix potential compiler error with ternary operator.

Change-Id: Ib09815c7b7b41ecc03e1e82f3a896f26b1e23d09
parent f1393985
No related branches found
No related tags found
No related merge requests found
......@@ -371,8 +371,14 @@ vtkStdString vtkPlotBag::GetTooltipLabel(const vtkVector2d &plotPos,
vtkAbstractArray *colName = vtkAbstractArray::SafeDownCast(
this->GetInput()->GetColumnByName("ColName"));
std::stringstream ss;
ss << (!colName ? "?" :
colName->GetVariantValue(seriesIndex).ToString());
if (colName)
{
ss << colName->GetVariantValue(seriesIndex).ToString();
}
else
{
ss << "?";
}
tooltipLabel += ss.str();
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment