Commit 6eff0342 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winedbg: Don't dereference possibly NULL thread pointer.

parent e137becb
...@@ -112,11 +112,11 @@ struct gdb_context ...@@ -112,11 +112,11 @@ struct gdb_context
static void gdbctx_delete_xpoint(struct gdb_context *gdbctx, struct dbg_thread *thread, static void gdbctx_delete_xpoint(struct gdb_context *gdbctx, struct dbg_thread *thread,
dbg_ctx_t *ctx, struct gdb_xpoint *x) dbg_ctx_t *ctx, struct gdb_xpoint *x)
{ {
struct dbg_process *process = thread->process; struct dbg_process *process = gdbctx->process;
struct backend_cpu *cpu = process->be_cpu; struct backend_cpu *cpu = process->be_cpu;
if (!cpu->remove_Xpoint(process->handle, process->process_io, ctx, x->type, x->addr, x->value, x->size)) if (!cpu->remove_Xpoint(process->handle, process->process_io, ctx, x->type, x->addr, x->value, x->size))
ERR("%04x:%04x: Couldn't remove breakpoint at:%p/%x type:%d\n", process->pid, thread->tid, x->addr, x->size, x->type); ERR("%04x:%04x: Couldn't remove breakpoint at:%p/%x type:%d\n", process->pid, thread ? thread->tid : ~0, x->addr, x->size, x->type);
list_remove(&x->entry); list_remove(&x->entry);
HeapFree(GetProcessHeap(), 0, x); HeapFree(GetProcessHeap(), 0, x);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment