diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-11 21:26:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-11 21:29:03 +0100 |
commit | aa3d649e5f4200551ec23edbc3d51734e5d94c47 (patch) | |
tree | 9bd2fc846b33640f03070f85fcf554d7652d7194 /sd | |
parent | 110d3b3d405eded0f0eda8e0987be16f66152f32 (diff) |
coverity#1362678 Dereference after null check
RelocateToWindow is only called by RelocateToParentWindow
RelocateToParentWindow is only called by RelocateToWindow and
ViewShellWrapper::relocateToAnchor
ViewShellWrapper::relocateToAnchor never passes nullptr as
its argument to RelocateToParentWindow
so presumably this can never be null
WriteFrameViewData was never called by that logic and
ReadFrameViewData was always called
Change-Id: Ida584b330d7c7539515a5e7287206f6469699b98
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 8fd55037d9e6..0b7ce99a61c6 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -292,11 +292,8 @@ bool SlideSorterViewShell::RelocateToParentWindow (vcl::Window* pParentWindow) if ( ! mpSlideSorter) return false; - if (pParentWindow == nullptr) - WriteFrameViewData(); const bool bSuccess (mpSlideSorter->RelocateToWindow(pParentWindow)); - if (pParentWindow != nullptr) - ReadFrameViewData(mpFrameView); + ReadFrameViewData(mpFrameView); return bSuccess; } diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 07c238254854..942f9a5fdba8 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -1563,8 +1563,7 @@ bool ViewShell::RelocateToParentWindow (vcl::Window* pParentWindow) { mpParentWindow = pParentWindow; - if (mpParentWindow) - mpParentWindow->SetBackground (Wallpaper()); + mpParentWindow->SetBackground (Wallpaper()); if (mpContentWindow.get() != nullptr) mpContentWindow->SetParent(pParentWindow); |