From: Paul Gofman Subject: [PATCH 2/2] msvcrt: Check for NULL type in dump_exception_type(). Message-Id: <20200831132312.772002-2-pgofman@codeweavers.com> Date: Mon, 31 Aug 2020 16:23:12 +0300 In-Reply-To: <20200831132312.772002-1-pgofman@codeweavers.com> References: <20200831132312.772002-1-pgofman@codeweavers.com> Signed-off-by: Paul Gofman --- dlls/msvcrt/except_x86_64.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c index 09eddfb9793..d201ff59bbd 100644 --- a/dlls/msvcrt/except_x86_64.c +++ b/dlls/msvcrt/except_x86_64.c @@ -118,9 +118,17 @@ static inline void dump_type(UINT type_rva, ULONG64 base) static void dump_exception_type(const cxx_exception_type *type, ULONG64 base) { - const cxx_type_info_table *type_info_table = rva_to_ptr(type->type_info_table, base); + const cxx_type_info_table *type_info_table; UINT i; + if (!type) + { + TRACE("NULL type\n"); + return; + } + + type_info_table = rva_to_ptr(type->type_info_table, base); + TRACE("flags %x destr %x(%p) handler %x(%p) type info %x(%p)\n", type->flags, type->destructor, rva_to_ptr(type->destructor, base), type->custom_handler, rva_to_ptr(type->custom_handler, base), -- 2.26.2