Skip to content

Commit fa249b1

Browse files
committed
Fix a bug that crept in when we switched dispatchers.
If needA is false, agrid likely doesn't exist, so we should just dispatch on the bgrid rather than try to verify a and b have the same type. I believe the old code would have ignored the passed in agrid in this case. Signed-off-by: jlait <[email protected]>
1 parent 9408abc commit fa249b1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Combine.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,9 +1524,7 @@ SOP_OpenVDB_Combine::Cache::combineGrids(
15241524
compOp.interrupt = hvdb::Interrupter();
15251525

15261526
int success = false;
1527-
if (needA || UTvdbGetGridType(*aGrid) == UTvdbGetGridType(*bGrid)) {
1528-
success = aGrid->apply<hvdb::VolumeGridTypes>(compOp);
1529-
}
1527+
success = (needA ? aGrid : bGrid)->apply<hvdb::VolumeGridTypes>(compOp);
15301528
if (!success || !compOp.outGrid) {
15311529
std::ostringstream ostr;
15321530
if (aGrid->type() == bGrid->type()) {

pendingchanges/vdbcombinefix.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Houdini:
2+
Fix crash in VDB Combine in Copy B mode if the second input has
3+
more VDBs than the first.

0 commit comments

Comments
 (0)