Fix #1060: Could crash if using --source-entry-point with -e; fixed.

This commit is contained in:
John Kessenich 2017-09-29 17:51:52 -06:00
parent 5a57ca680f
commit 3693e631f5
2 changed files with 6 additions and 2 deletions

View file

@ -152,7 +152,7 @@ public:
{
// Replace the entry point name given in the shader with the real entry point name,
// if there is a substitution.
if (name != nullptr && *name == sourceEntryPointName)
if (name != nullptr && *name == sourceEntryPointName && intermediate.getEntryPointName().size() > 0)
name = NewPoolTString(intermediate.getEntryPointName().c_str());
}