diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-10 22:55:02 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-09-12 10:35:28 +0000 |
commit | a0ab9803ec7e1effe7ff77fdfd13b9540ca7f6b8 (patch) | |
tree | cd46bef8be187b8ac3153b0d995f88d5fe5b3f92 /svx | |
parent | 5e13c24c7d1af9315db9e3abbc1d57fe0e8f1aa5 (diff) |
Resolves: rhbz#855972 crash on switching to outline view
Change-Id: Ic2675e9d1d8ce6bb67e9c9e4db292f79c4240409
(cherry picked from commit d1c1cce4ec0222ac50f9f78ddf5f4ce7aa7377ab)
Reviewed-on: https://gerrit.libreoffice.org/598
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmvwimp.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 546540e7a0f6..b22c63318594 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -940,8 +940,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]; |