summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-10 22:55:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-10 22:56:54 +0100
commitd1c1cce4ec0222ac50f9f78ddf5f4ce7aa7377ab (patch)
treeaf440ebac750ab3a0b3ceaf8b2655dd7eee0c33e
parent4c9e62c6e3513a57e86dfb7ea06a74ce2943aaaa (diff)
Resolves: rhbz#855972 crash on switching to outline view
Change-Id: Ic2675e9d1d8ce6bb67e9c9e4db292f79c4240409
-rw-r--r--svx/source/form/fmvwimp.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 195b47eb892a..638fd6eab9d9 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -938,8 +938,10 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/)
do
{
+ SdrPageView *pPageView = m_pView ? m_pView->GetSdrPageView() : NULL;
+ SdrPage *pSdrPage = pPageView ? pPageView->GetPage() : NULL;
// get the forms collection of the page we belong to
- FmFormPage* pPage = m_pView ? PTR_CAST( FmFormPage, m_pView->GetSdrPageView()->GetPage() ) : NULL;
+ FmFormPage* pPage = PTR_CAST( FmFormPage, pSdrPage );
Reference< XIndexAccess > xForms( pPage ? Reference< XIndexAccess >( pPage->GetForms(), UNO_QUERY ) : Reference< XIndexAccess >() );
const PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? NULL : m_aPageWindowAdapters[0];