Bugfix: do not call method on pointer that can be null.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-07-13 11:24:21 +02:00
parent eda6899571
commit 61b1a67140

View File

@ -154,7 +154,7 @@ struct HelperOps
}
}
// add contribution from NNC
if (nnc->hasNNC()) {
if (has_nnc) {
for (int i = 0; i < numNNC; ++i) {
fullngrad_tri.emplace_back(i+nf, nnc_cells(i,0), 1.0);
fullngrad_tri.emplace_back(i+nf, nnc_cells(i,1), -1.0);