mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
fixed: check pointers before dereference
quells a sca warning
This commit is contained in:
parent
c826a709b1
commit
a21b81d5d9
@ -418,6 +418,12 @@ well_controls_equal(const struct WellControls *ctrls1, const struct WellControls
|
||||
{
|
||||
bool are_equal = true;
|
||||
|
||||
if (!ctrls1 || !ctrls2) {
|
||||
if (verbose)
|
||||
printf("ctrls1 %p or cntrls2 %p is NULL\n", ctrls2, ctrls2);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ctrls1->num != ctrls2->num) {
|
||||
are_equal = false;
|
||||
if (verbose)
|
||||
|
Loading…
Reference in New Issue
Block a user