Fix a crash when dive date is epoch

With a dive that's date is 1970-01-01, starting at 00:00 the assert
causes subsurface to crash when performing auto grouping. This happens
to be a perfectly valid date, and we might end up getting such dates
when importing dives from other software, so removing the assert.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-01-03 08:13:47 +02:00 committed by Dirk Hohndel
parent ddd0523bb4
commit c2b076548d

View file

@ -655,7 +655,6 @@ void add_dive_to_trip(struct dive *dive, dive_trip_t *trip)
{
if (dive->divetrip == trip)
return;
assert(trip->when);
remove_dive_from_trip(dive, false);
trip->nrdives++;
dive->divetrip = trip;