< prev index next >

src/hotspot/share/prims/jvmtiEnvBase.cpp

Print this page
rev 50985 : 8206977: Minor improvements of runtime code.
Reviewed-by: coleenp, lfoltan

@@ -1217,11 +1217,11 @@
       state |= JVMTI_THREAD_STATE_INTERRUPTED;
     }
   }
   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));
   } else {
     infop->frame_buffer = NULL;
< prev index next >