diff options
-rw-r--r-- | mono/mini/debugger-agent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index 0a708d48229..747cc484fae 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -5398,7 +5398,10 @@ ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, StepFilte tls = (DebuggerTlsData *)mono_g_hash_table_lookup (thread_to_tls, thread); mono_loader_unlock (); g_assert (tls); - g_assert (tls->context.valid); + if (!tls->context.valid) { + DEBUG_PRINTF (1, "Received a single step request on a thread with no managed frames."); + return ERR_INVALID_ARGUMENT; + } if (tls->restore_state.valid && MONO_CONTEXT_GET_IP (&tls->context.ctx) != MONO_CONTEXT_GET_IP (&tls->restore_state.ctx)) { /* |