fixed: check pointers before dereference

quells a sca warning
This commit is contained in:
Arne Morten Kvarving 2019-06-25 09:28:51 +02:00
parent c826a709b1
commit a21b81d5d9

View File

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