Changeset 8559951 in subsurface


Ignore:
Timestamp:
Feb 3, 2017, 3:04:51 PM (7 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
ca6a241
Parents:
db7290a
git-author:
Robert C. Helling <helling@…> (02/03/17 13:50:10)
git-committer:
Dirk Hohndel <dirk@…> (02/03/17 15:04:51)
Message:

Don't do strcmp on NIL pointer

This is what we have same_string() for...

This prevents a crash when saving a dive in the planner.

Signed-off-by: Robert C. Helling <helling@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/statistics.c

    r5aa9c6fa r8559951  
    370370
    371371                for_each_dc(dive, dc) {
    372                         if (!strcmp(dc->model, "planned dive"))
     372                        if (same_string(dc->model, "planned dive"))
    373373                                continue;
    374374                        if (has_gaschange_event(dive, dc, idx))
Note: See TracChangeset for help on using the changeset viewer.