summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-19 20:49:17 +0100
committerAndras Timar <andras.timar@collabora.com>2014-08-21 21:24:48 +0200
commit4f9c43d5cbff18e84b0726a37779e5f5af64c589 (patch)
tree45dc06b1a23cd17fc78a2dcd4d08c1f5028abf32 /sd
parenta1b309787fc916f69a1315f042467f5ef748c7a7 (diff)
Resolves: fdo#82355 crash on loading ppt
regression probably triggered by... commit 2e3c45afc6c5ea74f1f8b4a7dce806e537870546 Date: Fri Mar 4 07:38:16 2011 -0800 Remove usage of deprecated List container. but that just stopped at the first NULL by chance Change-Id: I767e3bc3130d99cedceb4172857d1741c677b19b (cherry picked from commit f47baab6d35752b0babba768e299416ea5dd447d) Reviewed-on: https://gerrit.libreoffice.org/11029 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/sdpage2.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 0b9a552d75c2..2ab843a175db 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -208,9 +208,10 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
if (pSheet != pOldSheet)
{
- pObj->EndListening(*pOldSheet);
+ if (pOldSheet)
+ pObj->EndListening(*pOldSheet);
- if (!pObj->IsListening(*pSheet))
+ if (pSheet && !pObj->IsListening(*pSheet))
pObj->StartListening(*pSheet);
}