From 7b395fabbb138b084aecaa52c096b66d8aab9837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 3 Oct 2013 16:30:54 +0200 Subject: [PATCH] Guard against null-pointer dereference. This restores the check that was lost in commit 79562ca. --- opm/autodiff/SimulatorFullyImplicitBlackoil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp b/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp index 3cf736b6f..cf189c094 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoil.cpp @@ -280,7 +280,7 @@ namespace Opm gravity, */ { // Intercept usage of bcs, since we do not handle it. - if (bcs->nbc != 0) { + if (bcs && bcs->nbc != 0) { OPM_THROW(std::runtime_error, "SimulatorFullyImplicitBlackoil cannot handle boundary conditions other than no-flow. Not implemented yet."); } // For output.