Skip to content

Commit

Permalink
prevent crash when failed to load las file
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Jul 16, 2024
1 parent 34a07ca commit 6e1e3c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion easy3d/fileio/point_cloud_io_las.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ namespace easy3d {
LASreader *lasreader = lasreadopener.open();
if (!lasreader || lasreader->npoints <= 0) {
LOG(ERROR) << "could not open file: " << file_name;
lasreader->close();
if (lasreader)
lasreader->close();
delete lasreader;
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion easy3d/util/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace easy3d {
#define EASY3D_VERSION_NR 1020503

/// Easy3D release date, in the format YYYYMMDD.
#define EASY3D_RELEASE_DATE 20240614
#define EASY3D_RELEASE_DATE 20240716


#endif // EASY3D_UTIL_VERSION_H

0 comments on commit 6e1e3c1

Please sign in to comment.