changeset 7088:97d0eae99568

guard against nmethod allocation failure in implementation of PrintMachineCodeToFile option
author Doug Simon <doug.simon@oracle.com>
date Wed, 28 Nov 2012 19:18:39 +0100
parents 4c0d132dca4d
children af30115c9d0e
files src/share/vm/code/nmethod.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp	Wed Nov 28 18:48:17 2012 +0100
+++ b/src/share/vm/code/nmethod.cpp	Wed Nov 28 19:18:39 2012 +0100
@@ -632,7 +632,7 @@
     if (PrintAssembly && nm != NULL)
       Disassembler::decode(nm);
 
-    if (PrintMachineCodeToFile) {
+    if (nm != NULL && PrintMachineCodeToFile) {
       MachineCodePrinter::print(nm);
     }
   }