From: Nuno Lopes Date: Wed, 14 Jan 2009 17:51:41 +0000 (+0000) Subject: fix crash in the case when some arg is null X-Git-Tag: android-x86-6.0-r1~1003^2~23270 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a8c78a9e89afcca4f003c55bcdbd41a23ecd5c8d;p=android-x86%2Fexternal-llvm.git fix crash in the case when some arg is null git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62236 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index cd4c6921d2e..8139e822ee6 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/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; }