summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-28 13:20:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-28 13:55:10 +0100
commitde053813e38e4a036067f4ee26e479f9326614fa (patch)
treea89247f095986816ce68bcf81e00138317ef51e4
parent9a89946c95234b19ded1cecdd50bc1ddbd8f8fcb (diff)
Resolves: rhbz#1091117 SdGlobalResourceContainer used after delete
the configuration dispose triggers the presentation being restarted the only scenario I know where this is a problem is already fixed by rhbz#1032774 but lets try to fix this anyway Change-Id: Ib487601fc2c072dee7589bf71de964438cdd0087
-rw-r--r--sd/source/ui/inc/DrawController.hxx1
-rw-r--r--sd/source/ui/slideshow/SlideShowRestarter.cxx9
2 files changed, 10 insertions, 0 deletions
diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx
index a4e877a6d7b3..084040be7bf7 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -145,6 +145,7 @@ public:
//void fireSwitchCurrentPage( String pageName) throw();
void fireSwitchCurrentPage( sal_Int32 pageIndex) throw();
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>* mpCurrentLayer;
+ bool IsDisposing() const { return mbDisposing; }
/** Return a pointer to the ViewShellBase object that the DrawController
is connected to.
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx
index 63fae1125082..2b2d4645cedb 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -18,12 +18,14 @@
*/
+#include "DrawController.hxx"
#include "SlideShowRestarter.hxx"
#include "framework/ConfigurationController.hxx"
#include "framework/FrameworkHelper.hxx"
#include <comphelper/processfactory.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
+#include <sfx2/app.hxx>
#include <svx/svxids.hrc>
#include <vcl/svapp.hxx>
#include <boost/bind.hpp>
@@ -125,6 +127,13 @@ IMPL_LINK_NOARG(SlideShowRestarter, EndPresentation)
void SlideShowRestarter::StartPresentation (void)
{
+ //rhbz#1091117 crash because we're exiting the application, and this is
+ //being called during the configuration update event on exit. At this point
+ //newly created objects won't get disposed called on them, because the
+ //disposer is doing its last execution of that now.
+ if (mpViewShellBase && mpViewShellBase->GetDrawController().IsDisposing())
+ return;
+
if (mpDispatcher == NULL && mpViewShellBase!=NULL)
mpDispatcher = mpViewShellBase->GetViewFrame()->GetDispatcher();