mirror of
https://github.com/pgpointcloud/pointcloud.git
synced 2025-12-08 20:36:04 +00:00
Add a couple of return values check
now that pcerror is not guaranteed to exit it is worth checking returns
This commit is contained in:
parent
aebb3cb0d3
commit
9243eeaaee
@ -293,6 +293,7 @@ PCPATCH_DIMENSIONAL *
|
||||
pc_patch_dimensional_from_pointlist(const PCPOINTLIST *pdl)
|
||||
{
|
||||
PCPATCH_UNCOMPRESSED *patch = pc_patch_uncompressed_from_pointlist(pdl);
|
||||
if ( ! patch ) return NULL;
|
||||
PCPATCH_DIMENSIONAL *dimpatch = pc_patch_dimensional_from_uncompressed(patch);
|
||||
pc_patch_uncompressed_free(patch);
|
||||
return dimpatch;
|
||||
|
||||
@ -39,6 +39,7 @@ pc_patch_uncompressed_to_string(const PCPATCH_UNCOMPRESSED *patch)
|
||||
if ( ! pc_point_get_double_by_index(pt, j, &d))
|
||||
{
|
||||
pcerror("%s: unable to read double at index %d", __func__, j);
|
||||
return NULL;
|
||||
}
|
||||
if ( j )
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user