Don't crash if an MBB doesn't have an LLVM BB

llvm-svn: 30757
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 5311b2c..96a481f 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -857,7 +857,7 @@
     << MBB->getNumber();
   if (printColon)
     O << ':';
-  if (printComment)
+  if (printComment && MBB->getBasicBlock())
     O << '\t' << TAI->getCommentString() << MBB->getBasicBlock()->getName();
 }