From 0971e775294095c41aa076d7ed499850302561e7 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Wed, 14 Jan 2009 17:51:41 +0000 Subject: [PATCH] fix crash in the case when some arg is null llvm-svn: 62236 --- llvm/lib/VMCore/AsmWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index cd4c6921d2e2..8139e822ee6e 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -1671,7 +1671,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) { } else { for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) { Operand = I.getOperand(i); - if (Operand->getType() != TheType) { + if (Operand && Operand->getType() != TheType) { PrintAllTypes = true; // We have differing types! Print them all! break; }