summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-12 10:06:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-12 11:02:14 +0000
commitd60ecf4b1566e3c1d2ad060f798f283923492eae (patch)
tree9ab5d545a5594f106f82634bdb578fd1948fee32 /sd
parenta91d7e2d33d3c29afb78f05fb70cf5b03c97fb3a (diff)
coverity#704768 Dereference after null check
Change-Id: Ia101fcbc4b7288bccdc2fbd990124f4381f6f7f4
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorter.cxx12
1 files changed, 10 insertions, 2 deletions
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