diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2007-10-16 01:03:10 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2007-10-16 01:03:10 +0000 |
commit | 1e60d1fca0e0269083d439b6e5c9275dd21d118f (patch) | |
tree | 7affa3e724df8914461451927d13e4787b7b02b1 /gpsutils.c | |
parent | ca6d5e49326dd5ad83310070b0df77228dcac3b1 (diff) | |
download | gpsd-1e60d1fca0e0269083d439b6e5c9275dd21d118f.tar.gz |
avoid a core dump if somehow one of these pointers is NULL
Diffstat (limited to 'gpsutils.c')
-rw-r--r-- | gpsutils.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -105,6 +105,8 @@ void gps_merge_fix(/*@ out @*/struct gps_fix_t *to, /*@ in @*/struct gps_fix_t *from) /* merge new data into an old fix */ { + if ((NULL == to) || (NULL == from)) + return; if ((transfer & TIME_SET)!=0) to->time = from->time; if ((transfer & LATLON_SET)!=0) { |