From a2d8d4162c366e0bd7622b2d907ba4026449a159 Mon Sep 17 00:00:00 2001
From: Joachim Pouderoux <joachim.pouderoux@kitware.com>
Date: Wed, 16 Apr 2014 20:36:50 +0200
Subject: [PATCH] Fix potential compiler error with ternary operator.

Change-Id: Ib09815c7b7b41ecc03e1e82f3a896f26b1e23d09
---
 Charts/Core/vtkPlotBag.cxx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Charts/Core/vtkPlotBag.cxx b/Charts/Core/vtkPlotBag.cxx
index 58dd4d5fc53..6a7ef5d1f2f 100644
--- a/Charts/Core/vtkPlotBag.cxx
+++ b/Charts/Core/vtkPlotBag.cxx
@@ -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;
-- 
GitLab