mshtml: Avoid null pointer dereference in OmHistory_get_length (cppcheck).

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2021-12-19 21:54:37 -07:00 committed by Alexandre Julliard
parent 3f2458996c
commit 06e0220ed6
1 changed files with 1 additions and 1 deletions

View File

@ -674,7 +674,7 @@ static HRESULT WINAPI OmHistory_get_length(IOmHistory *iface, short *p)
if(This->window && This->window->base.outer_window)
browser = This->window->base.outer_window->browser;
*p = browser->doc->travel_log
*p = browser && browser->doc->travel_log
? ITravelLog_CountEntries(browser->doc->travel_log, browser->doc->browser_service)
: 0;
return S_OK;