diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c index b629213d769..376a780653b 100644 --- a/dll/win32/dbghelp/pe_module.c +++ b/dll/win32/dbghelp/pe_module.c @@ -615,6 +615,15 @@ static BOOL pe_load_msc_debug_info(const struct process* pcs, struct module* mod dbg = RtlImageRvaToVa(nth, mapping, dir->VirtualAddress, NULL); +#ifdef __REACTOS__ + if (!dbg) + { + ERR("Debug directory not found in module %s\n", + debugstr_w(module->module.ModuleName)); + goto done; + } +#endif + /* Parse debug directory */ if (nth->FileHeader.Characteristics & IMAGE_FILE_DEBUG_STRIPPED) {