Fix malformed program crashes.

This commit is contained in:
Matt Pharr
2011-12-08 14:35:12 -08:00
parent a79bc75b72
commit aec7da740a
2 changed files with 8 additions and 2 deletions

View File

@@ -353,7 +353,10 @@ AtomicType::Mangle() const {
std::string
AtomicType::GetCDeclaration(const std::string &name) const {
std::string ret;
assert(isUniform);
if (isUniform == false) {
assert(m->errorCount > 0);
return ret;
}
if (isConst) ret += "const ";
switch (basicType) {