summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-09-11 12:00:00 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-09-11 12:00:00 (GMT)
commit9f679ee28acf5dd6eb92ed2e32dedfb4283ad8ad (patch)
tree60485b96ebddd829f89e6cfe5082a1046b36ceae
parentc383650b64c994ae63e57aab6bb8cd193f8537da (diff)
downloadblt-9f679ee28acf5dd6eb92ed2e32dedfb4283ad8ad.zip
blt-9f679ee28acf5dd6eb92ed2e32dedfb4283ad8ad.tar.gz
blt-9f679ee28acf5dd6eb92ed2e32dedfb4283ad8ad.tar.bz2
NULL check to prevent segfault
-rw-r--r--generic/tkbltGrElemLine.C4
1 files 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];
}