Skip to content

Commit

Permalink
Fix segfault copc + lax
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Romain committed Dec 8, 2023
1 parent b38aacc commit 3076c2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/LASlib/lasreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,7 @@ LASreader* LASreadOpener::open(const CHAR* other_file_name, BOOL reset_after_oth
if (index)
{
REprintf("WARNING: both LAX file and COPC spatial indexing registered. COPC has the precedence.\n");
delete index;
index = 0;
lasreaderlas->set_index(0); // delete the index internally
}

COPCindex *copc_index = new COPCindex(lasreaderlas->header);
Expand Down
3 changes: 1 addition & 2 deletions src/LASlib/lasreadermerged.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,8 +1530,7 @@ BOOL LASreaderMerged::open_next_file()
if (index)
{
REprintf( "WARNING: both LAX file and COPC spatial indexing registered. COPC has the precedence.\n");
delete index;
index = 0;
lasreaderlas->set_index(0); // delete the index internally
}

COPCindex *copc_index = new COPCindex(lasreaderlas->header);
Expand Down

0 comments on commit 3076c2d

Please sign in to comment.