From 26c739a4fec6626142323f80ba003494c58f304b Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Fri, 2 Jul 2021 09:43:32 +0200 Subject: [PATCH] winedbg: Fix crash when no process attached in 'info wnd' command. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49625 Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard (cherry picked from commit 5d8bad570d23fe7d69a04d8162fc3d4b76aad625) Signed-off-by: Michael Stefaniuc --- programs/winedbg/debugger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h index ddac129bab5..a63e160fac3 100644 --- a/programs/winedbg/debugger.h +++ b/programs/winedbg/debugger.h @@ -39,7 +39,7 @@ #include "oaidl.h" #include -#define ADDRSIZE (dbg_curr_process->be_cpu->pointer_size) +#define ADDRSIZE (dbg_curr_process ? dbg_curr_process->be_cpu->pointer_size : (int)sizeof(void*)) #define ADDRWIDTH (ADDRSIZE * 2) /* the debugger uses these exceptions for its internal use */