diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-01-02 11:34:05 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-01-06 10:43:04 +0100 |
commit | 2a7aef0ca8e373069085d8330d00870d32ca5f78 (patch) | |
tree | 82b3ae81ecfc4e87cd597d5c5101ece39ad05120 /sd | |
parent | 0c8848394df6e0c8ac3149ffde1314e8e1171869 (diff) |
tdf#129712: check if outliner view pointer is valid to avoid crash
Regression after commit 64233bbaa0e91ddf14d59ae7547df6bbfa60adcc.
editenglo.dll!std::unique_ptr<EditView,std::default_delete<EditView>>::operator*()
at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1886)
editenglo.dll!OutlinerView::GetEditView()
at C:\lo\src\core\include\editeng\outliner.hxx(208)
sdlo.dll!sd::DrawViewShell::GetAttrState(SfxItemSet & rSet)
at C:\lo\src\core\sd\source\ui\view\drviewsf.cxx(514)
sdlo.dll!SfxStubGraphicViewShellGetAttrState(SfxShell * pShell, SfxItemSet & rSet)
at C:\lo\src\core\workdir\SdiTarget\sd\sdi\sdgslots.hxx(1524)
sfxlo.dll!SfxShell::CallState(void(*)(SfxShell *, SfxItemSet &) pFunc, SfxItemSet & rSet)
at C:\lo\src\core\include\sfx2\shell.hxx(199)
sfxlo.dll!SfxDispatcher::FillState_(const SfxSlotServer & rSvr, SfxItemSet & rState, const SfxSlot * pRealSlot)
at C:\lo\src\core\sfx2\source\control\dispatch.cxx(1672)
sfxlo.dll!SfxBindings::Update_Impl(SfxStateCache & rCache)
at C:\lo\src\core\sfx2\source\control\bindings.cxx(270)
sfxlo.dll!SfxBindings::NextJob_Impl(const Timer * pTimer)
at C:\lo\src\core\sfx2\source\control\bindings.cxx(1285)
sfxlo.dll!SfxBindings::NextJob(Timer * pTimer)
at C:\lo\src\core\sfx2\source\control\bindings.cxx(1230)
sfxlo.dll!SfxBindings::LinkStubNextJob(void * instance, Timer * data)
at C:\lo\src\core\sfx2\source\control\bindings.cxx(1227)
vcllo.dll!Link<Timer *,void>::Call(Timer * data)
at C:\lo\src\core\include\tools\link.hxx(111)
vcllo.dll!Timer::Invoke()
at C:\lo\src\core\vcl\source\app\timer.cxx(76)
vcllo.dll!Scheduler::ProcessTaskScheduling()
at C:\lo\src\core\vcl\source\app\scheduler.cxx(478)
vcllo.dll!Scheduler::CallbackTaskScheduling()
at C:\lo\src\core\vcl\source\app\scheduler.cxx(288)
vcllo.dll!SalTimer::CallCallback()
at C:\lo\src\core\vcl\inc\saltimer.hxx(55)
vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer()
at C:\lo\src\core\vcl\win\app\saltimer.cxx(164)
vclplug_winlo.dll!WinSalTimer::ImplHandleTimerEvent(unsigned __int64 aWPARAM)
at C:\lo\src\core\vcl\win\app\saltimer.cxx(174)
vclplug_winlo.dll!SalComWndProc(HWND__ * __formal, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef)
at C:\lo\src\core\vcl\win\app\salinst.cxx(626)
vclplug_winlo.dll!SalComWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam)
at C:\lo\src\core\vcl\win\app\salinst.cxx(658)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchMessageWorker()
vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg)
at C:\lo\src\core\vcl\win\app\salinst.cxx(420)
vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents)
at C:\lo\src\core\vcl\win\app\salinst.cxx(493)
vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
at C:\lo\src\core\vcl\win\app\salinst.cxx(522)
vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents)
at C:\lo\src\core\vcl\source\app\svapp.cxx(446)
vcllo.dll!Application::Yield()
at C:\lo\src\core\vcl\source\app\svapp.cxx(511)
vcllo.dll!Application::Execute()
at C:\lo\src\core\vcl\source\app\svapp.cxx(427)
sofficeapp.dll!desktop::Desktop::Main()
at C:\lo\src\core\desktop\source\app\app.cxx(1609)
vcllo.dll!ImplSVMain()
at C:\lo\src\core\vcl\source\app\svmain.cxx(191)
vcllo.dll!SVMain()
at C:\lo\src\core\vcl\source\app\svmain.cxx(226)
sofficeapp.dll!soffice_main()
at C:\lo\src\core\desktop\source\app\sofficemain.cxx(171)
soffice.bin!sal_main()
at C:\lo\src\core\desktop\source\app\main.c(48)
soffice.bin!main(int argc, char * * argv)
at C:\lo\src\core\desktop\source\app\main.c(47)
soffice.bin!invoke_main()
at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(79)
soffice.bin!__scrt_common_main_seh()
at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288)
soffice.bin!__scrt_common_main()
at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(331)
soffice.bin!mainCRTStartup()
at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp(17)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
Change-Id: Ia9ba183bc1be2f22082ac3833e57435dd8462adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86097
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e590d1ab4a3f605141d653b575d645453dba57c9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86101
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsf.cxx | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index b2ba46958b5d..f7f5b1e9ab86 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1199,8 +1199,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) // First make sure the field is selected OutlinerView* pOutView = mpDrawView->GetTextEditOutlinerView(); if (pOutView) + { pOutView->SelectFieldAtCursor(); - URLFieldHelper::RemoveURLField(pOutView->GetEditView()); + URLFieldHelper::RemoveURLField(pOutView->GetEditView()); + } } } Cancel(); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 0874a587a3a1..7fd0ce58368e 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1449,8 +1449,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) { if( mpDrawView->IsTextEdit() ) { - OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView(); - if (pOLV && URLFieldHelper::IsCursorAtURLField(pOLV->GetEditView())) + if (URLFieldHelper::IsCursorAtURLField(mpDrawView->GetTextEditOutlinerView())) bDisableEditHyperlink = false; } else diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 5533c62510b8..565283ce1c3a 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -505,7 +505,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) case SID_REMOVE_HYPERLINK: { - if (!URLFieldHelper::IsCursorAtURLField(mpDrawView->GetTextEditOutlinerView()->GetEditView())) + if (!URLFieldHelper::IsCursorAtURLField(mpDrawView->GetTextEditOutlinerView())) rSet.DisableItem(nWhich); } break; |