[PATCH 0/1] MR2798: mshtml: Remove redundant null check from OleDocumentView_UIActivate (Coverity).
From: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/mshtml/view.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index 3f31e609e39..cc66c1ff33a 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -724,8 +724,7 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f call_set_active_object((IOleInPlaceUIWindow*)This->frame, NULL); if(This->hostui) IDocHostUIHandler_HideUI(This->hostui); - if(This->ipsite) - IOleInPlaceSite_OnUIDeactivate(This->ipsite, FALSE); + IOleInPlaceSite_OnUIDeactivate(This->ipsite, FALSE); } } return S_OK; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2798
Why is it redundant? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2798#note_33800
On Thu May 25 15:23:45 2023 +0000, Jacek Caban wrote:
Why is it redundant? The first thing that OleDocumentView_UIActivate does is ensure that This->ipsite is not NULL.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2798#note_33823
On Thu May 25 15:23:45 2023 +0000, Alex Henrie wrote:
The first thing that OleDocumentView_UIActivate does is ensure that This->ipsite is not NULL. Yes, but calls like `HideUI()` may change that.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2798#note_33825
On Thu May 25 15:33:05 2023 +0000, Jacek Caban wrote:
Yes, but calls like `HideUI()` may change that. OK, I've marked it as a false positive in Coverity. Thanks.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2798#note_33826
This merge request was closed by Alex Henrie. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2798
participants (3)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Jacek Caban (@jacek)