dbghelp: Add a null check for optional output parameter for function SymFromAddr.

This commit is contained in:
Stefan Leichter 2013-12-01 22:07:20 +01:00 committed by Alexandre Julliard
parent 0b5b54e9f4
commit 89832cde4e
1 changed files with 2 additions and 1 deletions

View File

@ -1229,7 +1229,8 @@ BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address,
if ((sym = symt_find_nearest(pair.effective, Address)) == NULL) return FALSE;
symt_fill_sym_info(&pair, NULL, &sym->symt, Symbol);
*Displacement = Address - Symbol->Address;
if (Displacement)
*Displacement = Address - Symbol->Address;
return TRUE;
}