Merge pull request #1050 from blattms/make-wells_equal-work-for-null-wells
Make wells_equal work for null wells.
This commit is contained in:
@@ -545,6 +545,16 @@ bool
|
||||
wells_equal(const struct Wells *W1, const struct Wells *W2 , bool verbose)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
// Cater the case where W1 and W2 are the same (null) pointers.
|
||||
if( W1 == W2 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( W1 == NULL || W2 == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool are_equal = true;
|
||||
are_equal = (W1->number_of_wells == W2->number_of_wells);
|
||||
are_equal = are_equal && (W1->number_of_phases == W2->number_of_phases);
|
||||
|
Reference in New Issue
Block a user