Skip to content

Commit

Permalink
refactor: process correctly even if the s57 object is null
Browse files Browse the repository at this point in the history
Easier to do modifications when debugging.
  • Loading branch information
hornang committed Oct 23, 2022
1 parent 054c37f commit 9afd393
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/chartfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,10 @@ bool ChartFile::ingest200(IReader *fpx,
}
_OSENC_AreaGeometry_Record_Payload *pPayload = (_OSENC_AreaGeometry_Record_Payload *)buf;

unsigned char *next_byte = nullptr;
next_byte = skipTessellationData(pPayload);

if (s57 != nullptr) {
unsigned char *next_byte = nullptr;
next_byte = skipTessellationData(pPayload);
s57->setLineGeometry(reinterpret_cast<S57::LineElement *>(next_byte),
pPayload->edgeVector_count);
}
Expand Down

0 comments on commit 9afd393

Please sign in to comment.