diff options
Diffstat (limited to 'src/lj_profile.c')
| -rw-r--r-- | src/lj_profile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_profile.c b/src/lj_profile.c index 5b2a2b6c7..ea65fcb8f 100644 --- a/src/lj_profile.c +++ b/src/lj_profile.c | |||
| @@ -359,6 +359,7 @@ LUA_API void luaJIT_profile_stop(lua_State *L) | |||
| 359 | ProfileState *ps = &profile_state; | 359 | ProfileState *ps = &profile_state; |
| 360 | global_State *g = ps->g; | 360 | global_State *g = ps->g; |
| 361 | if (G(L) == g) { /* Only stop profiler if started by this VM. */ | 361 | if (G(L) == g) { /* Only stop profiler if started by this VM. */ |
| 362 | ps->g = NULL; | ||
| 362 | profile_timer_stop(ps); | 363 | profile_timer_stop(ps); |
| 363 | g->hookmask &= ~HOOK_PROFILE; | 364 | g->hookmask &= ~HOOK_PROFILE; |
| 364 | lj_dispatch_update(g, 0); | 365 | lj_dispatch_update(g, 0); |
| @@ -368,7 +369,6 @@ LUA_API void luaJIT_profile_stop(lua_State *L) | |||
| 368 | #endif | 369 | #endif |
| 369 | lj_buf_free(g, &ps->sb); | 370 | lj_buf_free(g, &ps->sb); |
| 370 | ps->sb.w = ps->sb.e = NULL; | 371 | ps->sb.w = ps->sb.e = NULL; |
| 371 | ps->g = NULL; | ||
| 372 | } | 372 | } |
| 373 | } | 373 | } |
| 374 | 374 | ||
