Errors and Build: Fix build warnings, which also improved error messages.

This commit is contained in:
John Kessenich
2018-07-12 15:11:07 -06:00
parent b75c7065cc
commit e7f9caeac4
11 changed files with 208 additions and 216 deletions

View File

@@ -737,17 +737,18 @@ void CompileShaders(glslang::TWorklist& worklist)
glslang::TWorkItem* workItem;
if (Options & EOptionStdin) {
worklist.remove(workItem);
ShHandle compiler = ShConstructCompiler(FindLanguage("stdin"), Options);
if (compiler == 0)
return;
if (worklist.remove(workItem)) {
ShHandle compiler = ShConstructCompiler(FindLanguage("stdin"), Options);
if (compiler == nullptr)
return;
CompileFile("stdin", compiler);
CompileFile("stdin", compiler);
if (! (Options & EOptionSuppressInfolog))
workItem->results = ShGetInfoLog(compiler);
ShDestruct(compiler);
ShDestruct(compiler);
}
} else {
while (worklist.remove(workItem)) {
ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options);