summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-03-18 13:19:59 +0100
committerThorsten Behrens <tbehrens@novell.com>2011-03-18 13:22:07 +0100
commitd53f1f6ee9f02d3d77c76910023986f7f346fc30 (patch)
tree021bc4c68388e2f47c9d254c7d7be37ea8eb12cc
parentdbf952b83b4cc8fbb7576a0959142920f824d87d (diff)
Fix fdo#33947 crash in Impress after printing
Fixes lifetime issue with DrawViewShell - solved by not handing one in to the print preview DocumentRenderer Signed-off-by: Thorsten Behrens <tbehrens@novell.com>
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/drawview.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 15461c060..5b6923c90 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1329,7 +1329,7 @@ public:
::boost::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell()));
if ( ! mpPrintView)
- mpPrintView.reset(new DrawView(mrBase.GetDocShell(), &rPrinter, pDrawViewShell.get()));
+ mpPrintView.reset(new DrawView(mrBase.GetDocShell(), &rPrinter, NULL));
if (nIndex<0 || sal::static_int_cast<sal_uInt32>(nIndex)>=maPrinterPages.size())
return;
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index ea0158687..40ca3a3aa 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -550,7 +550,7 @@ BOOL DrawView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
void DrawView::MakeVisible(const Rectangle& rRect, ::Window& rWin)
{
- if (!rRect.IsEmpty())
+ if (!rRect.IsEmpty() && mpDrawViewShell)
{
mpDrawViewShell->MakeVisible(rRect, rWin);
}