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 88ebfeba28
commit f976c6ee9d

View File

@ -550,6 +550,10 @@ 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);