From 9f8cb850e49808b9e45f07e2527fa84bf0d01d48 Mon Sep 17 00:00:00 2001 From: "t.jung" Date: Tue, 24 Jul 2018 13:22:21 +0200 Subject: [PATCH] Fixes a crash when in/out varying variable had no semantic name and an error was reported in ioremapper phase when the variable was rejected --- glslang/MachineIndependent/iomapper.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/glslang/MachineIndependent/iomapper.cpp b/glslang/MachineIndependent/iomapper.cpp index 9248214..66f6f30 100755 --- a/glslang/MachineIndependent/iomapper.cpp +++ b/glslang/MachineIndependent/iomapper.cpp @@ -331,8 +331,14 @@ struct TResolverInOutAdaptor ent.symbol->getType(), ent.live); } else { - TString errorMsg = "Invalid shader In/Out variable semantic: "; - errorMsg += ent.symbol->getType().getQualifier().semanticName; + TString errorMsg; + if (ent.symbol->getType().getQualifier().semanticName != nullptr) { + errorMsg = "Invalid shader In/Out variable semantic: "; + errorMsg += ent.symbol->getType().getQualifier().semanticName; + } else { + errorMsg = "Invalid shader In/Out variable: "; + errorMsg += ent.symbol->getName(); + } infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); error = true; } -- 2.7.4