Skip to content

Commit

Permalink
c: wrap spvc_compiler_set_entry_point in error scope
Browse files Browse the repository at this point in the history
  • Loading branch information
chyyran committed Aug 31, 2024
1 parent dae7a68 commit 96cea7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spirv_cross_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,11 @@ spvc_result spvc_compiler_get_entry_points(spvc_compiler compiler, const spvc_en

spvc_result spvc_compiler_set_entry_point(spvc_compiler compiler, const char *name, SpvExecutionModel model)
{
compiler->compiler->set_entry_point(name, static_cast<spv::ExecutionModel>(model));
SPVC_BEGIN_SAFE_SCOPE
{
compiler->compiler->set_entry_point(name, static_cast<spv::ExecutionModel>(model));
}
SPVC_END_SAFE_SCOPE(compiler->context, SPVC_ERROR_INVALID_ARGUMENT)
return SPVC_SUCCESS;
}

Expand Down

0 comments on commit 96cea7f

Please sign in to comment.