From 9f679ee28acf5dd6eb92ed2e32dedfb4283ad8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Medra=C3=B1o=20Calvo?= Date: Tue, 11 Sep 2018 12:00:00 +0000 Subject: NULL check to prevent segfault --- generic/tkbltGrElemLine.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tkbltGrElemLine.C b/generic/tkbltGrElemLine.C index ac2b340..988c1de 100644 --- a/generic/tkbltGrElemLine.C +++ b/generic/tkbltGrElemLine.C @@ -1728,7 +1728,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) if ((isfinite(x)) && (isfinite(y))) { double high; double low; - if (ops->xError->nValues() > 0) { + if (ops->xError && ops->xError->nValues() > 0) { high = x + ops->xError->values_[ii]; low = x - ops->xError->values_[ii]; } @@ -1795,7 +1795,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) if ((isfinite(x)) && (isfinite(y))) { double high; double low; - if (ops->yError->nValues() > 0) { + if (ops->yError && ops->yError->nValues() > 0) { high = y + ops->yError->values_[ii]; low = y - ops->yError->values_[ii]; } -- cgit v0.12