Signed-off-by: Anton Lundin <gla...@acc.umu.se> --- dive.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dive.c b/dive.c index 683fbb8..4cb9672 100644 --- a/dive.c +++ b/dive.c @@ -2369,6 +2369,9 @@ int average_depth(struct diveplan *dive) int last_depth = 0; struct divedatapoint *dp = dive->dp; + if (!dp) + return 0; + while (dp) { if (dp->time) { /* Ignore gas indication samples */ -- 1.9.1 _______________________________________________ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface