hotspot/src/share/vm/compiler/compileTask.cpp
changeset 38133 78b95467b9f1
parent 37296 613278eb2a1e
child 38218 f5ba1dea04eb
--- a/hotspot/src/share/vm/compiler/compileTask.cpp	Mon Apr 25 21:25:22 2016 +0300
+++ b/hotspot/src/share/vm/compiler/compileTask.cpp	Tue Apr 26 10:28:51 2016 +0200
@@ -135,7 +135,11 @@
 //
 nmethod* CompileTask::code() const {
   if (_code_handle == NULL)  return NULL;
-  return _code_handle->code();
+  CodeBlob *blob = _code_handle->code();
+  if (blob != NULL) {
+    return blob->as_nmethod();
+  }
+  return NULL;
 }
 
 void CompileTask::set_code(nmethod* nm) {