mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Another case of 'dereference before NULL check'
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9ee0bfe633
commit
0b7c11a597
1 changed files with 3 additions and 1 deletions
|
@ -793,10 +793,12 @@ struct dive *merge_two_dives(struct dive *a, struct dive *b)
|
||||||
{
|
{
|
||||||
struct dive *res;
|
struct dive *res;
|
||||||
int i, j;
|
int i, j;
|
||||||
int id = a->id;
|
int id;
|
||||||
|
|
||||||
if (!a || !b)
|
if (!a || !b)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
id = a->id;
|
||||||
i = get_divenr(a);
|
i = get_divenr(a);
|
||||||
j = get_divenr(b);
|
j = get_divenr(b);
|
||||||
res = merge_dives(a, b, b->when - a->when, false);
|
res = merge_dives(a, b, b->when - a->when, false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue