Prevent segfault for dive with gas change but no samples

Not quite sure where such a dive would come from, but anyway, just don't
dereference the pointer unless it's non-NULL.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>