Index: src/platform-cygwin.cc |
diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc |
index b39dfc0eef8aa6132fee8de5ab519d03dcabcb98..01da93d87c35e1f9e78d10c2cb199eea67e30a1f 100644 |
--- a/src/platform-cygwin.cc |
+++ b/src/platform-cygwin.cc |
@@ -692,8 +692,9 @@ class SamplerThread : public Thread { |
CONTEXT context; |
memset(&context, 0, sizeof(context)); |
- TickSample* sample = CpuProfiler::StartTickSampleEvent(sampler->isolate()); |
- if (sample == NULL) return; |
+ TickSample sample_obj; |
+ TickSample* sample = CpuProfiler::StartTickSampleEvent(isolate); |
+ if (sample == NULL) sample = &sample_obj; |
static const DWORD kSuspendFailed = static_cast<DWORD>(-1); |
if (SuspendThread(profiled_thread) == kSuspendFailed) return; |