Make wells_equal work for only one null pointer.

This commit is contained in:
Markus Blatt 2016-06-27 13:29:44 +02:00
parent f66f699fca
commit 7d97ef7e4a

View File

@ -550,7 +550,11 @@ wells_equal(const struct Wells *W1, const struct Wells *W2 , bool verbose)
{
return true;
}
if( W1 == 0 || W2 == 0)
{
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);