From d60ecf4b1566e3c1d2ad060f798f283923492eae Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 12 Mar 2014 10:06:29 +0000 Subject: coverity#704768 Dereference after null check Change-Id: Ia101fcbc4b7288bccdc2fbd990124f4381f6f7f4 --- sd/source/ui/slidesorter/shell/SlideSorter.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index 9e9c189aa6ee..24b92c983cce 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -529,10 +529,18 @@ bool SlideSorter::RelocateToWindow (::Window* pParentWindow) ReleaseListeners(); - if (mpViewShell != NULL) + Window *pParentWindow; + if (mpViewShell) + { mpViewShell->ViewShell::RelocateToParentWindow(pParentWindow); + pParentWindow = mpViewShell->GetParentWindow(); + } + else + { + pParentWindow = NULL; + } - SetupControls(mpViewShell->GetParentWindow()); + SetupControls(pParentWindow); SetupListeners(); // For accessibility we have to shortly hide the content window. This -- cgit