src/hotspot/share/prims/jvmtiEnvBase.cpp
changeset 51070 2f4c3cac8556
parent 49816 a3e79f97e86b
child 51608 625a5bdde0c5
--- a/src/hotspot/share/prims/jvmtiEnvBase.cpp	Thu Jul 12 16:30:47 2018 +0200
+++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp	Wed Jul 11 16:11:10 2018 +0200
@@ -1219,7 +1219,7 @@
   }
   infop->state = state;
 
-  if (thr != NULL || (state & JVMTI_THREAD_STATE_ALIVE) != 0) {
+  if (thr != NULL && (state & JVMTI_THREAD_STATE_ALIVE) != 0) {
     infop->frame_buffer = NEW_RESOURCE_ARRAY(jvmtiFrameInfo, max_frame_count());
     env()->get_stack_trace(thr, 0, max_frame_count(),
                            infop->frame_buffer, &(infop->frame_count));