Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index 2a9f10e56afb72662a0b29fbdee9367d42589502..a0226edef9fd262d2163b475a422ece793cc3567 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -1015,10 +1015,14 @@ intptr_t Isolate::ProfileInterrupt() { |
// Profiler blocked for this isolate. |
return 0; |
} |
- if (message_handler()->paused_on_start() || |
- message_handler()->paused_on_exit() || |
- debugger()->IsPaused()) { |
- // Paused at start / exit / breakpoint. Don't tick. |
+ if ((debugger() != NULL) && debugger()->IsPaused()) { |
+ // Paused at breakpoint. Don't tick. |
+ return 0; |
+ } |
+ if ((message_handler() != NULL) && |
+ (message_handler()->paused_on_start() || |
+ message_handler()->paused_on_exit())) { |
+ // Paused at start / exit . Don't tick. |
return 0; |
} |
InterruptableThreadState* state = thread_state(); |