Make wells_equal work for only one null pointer.
This commit is contained in:
1 parent
f66f699fca
commit
7d97ef7e4a
1 file changed
+5
-1
@@ -550,7 +550,11 @@ wells_equal(const struct Wells *W1, const struct Wells *W2 , bool verbose)
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if( W1 == 0 || W2 == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool are_equal = true;
|
bool are_equal = true;
|
||||||
are_equal = (W1->number_of_wells == W2->number_of_wells);
|
are_equal = (W1->number_of_wells == W2->number_of_wells);
|
||||||
are_equal = are_equal && (W1->number_of_phases == W2->number_of_phases);
|
are_equal = are_equal && (W1->number_of_phases == W2->number_of_phases);
|
||||||
|
|||||||
Reference in new issue
Block a user