summaryrefslogtreecommitdiff
path: root/sd/source
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
commita82087ada54119343ac425c5999aa6c72c094581 (patch)
tree46a87be77f745fba549c2e2d9a2d3e5afafd0f3e /sd/source
parent315eec9e4dbdd27063f4b970c25e9c719e86bcd8 (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>
Diffstat (limited to 'sd/source')
-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 1165b5bb3c2e..800255a0e58c 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 bb75f1c07773..3b797b67f0d6 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);
}