Skip to content

Commit 93ad78a

Browse files
committed
matp: Fix crash when reflecting parameters (#9089)
1 parent 94b8ee4 commit 93ad78a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/matc/src/matc/MaterialCompiler.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ bool MaterialCompiler::run(const matp::Config& config) {
7070
return false;
7171
}
7272

73+
// If we're reflecting parameters, the MaterialParser will have handled it inside of parse().
74+
// We should return here to avoid actually building a material.
75+
if (config.getReflectionTarget() != matp::Config::Metadata::NONE) {
76+
return true;
77+
}
78+
7379
JobSystem js;
7480
js.adopt();
7581

0 commit comments

Comments
 (0)