Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nullptr dereferences found by gcc 11.4 #1679

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ SOP_OpenVDB_Convert::Cache::referenceMeshing(
typename GridType::ConstPtr grid = openvdb::gridConstPtrCast<GridType>(*it);

if (!grid) {
badTypeList.push_back(grid->getName());
badTypeList.push_back((*it)->getName());
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ SOP_OpenVDB_Extrapolate::Cache::process(
if (parms.mNeedExt) {
typename ExtGridT::ConstPtr extGrid = openvdb::gridConstPtrCast<ExtGridT>(exPrim->getConstGridPtr());
if (!extGrid) {
std::string msg = "Extension grid (" + extGrid->getName() + ") cannot be converted " +
auto grid = exPrim->getConstGridPtr();
std::string msg = "Extension grid (" + grid->getName() + ") cannot be converted " +
"to the explicit type specified.";
throw std::runtime_error(msg);
}
Expand Down
2 changes: 1 addition & 1 deletion openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Fracture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ SOP_OpenVDB_Fracture::Cache::process(
residuals.push_back(residual);

} else {
badTypeList.push_back(residual->getName());
badTypeList.push_back((*it)->getName());
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ SOP_OpenVDB_To_Polygons::Cache::referenceMeshing(
typename GridType::ConstPtr grid = openvdb::gridConstPtrCast<GridType>(*it);

if (!grid) {
badTypeList.push_back(grid->getName());
badTypeList.push_back((*it)->getName());
continue;
}

Expand Down
Loading