Merge pull request #40 from bska/nullptr-deref

Guard against null-pointer dereference.
This commit is contained in:
Bård Skaflestad 2013-10-03 07:33:33 -07:00
commit dc762989ab

View File

@ -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.