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 /include | |
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 'include')
-rw-r--r-- | include/editeng/urlfieldhelper.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/editeng/urlfieldhelper.hxx b/include/editeng/urlfieldhelper.hxx index e6c7c92935a4..9a1d53d15512 100644 --- a/include/editeng/urlfieldhelper.hxx +++ b/include/editeng/urlfieldhelper.hxx @@ -19,6 +19,10 @@ class EDITENG_DLLPUBLIC URLFieldHelper public: static void RemoveURLField(EditView& pEditView); static bool IsCursorAtURLField(const EditView& pEditView); + static bool IsCursorAtURLField(const OutlinerView* pOLV) + { + return pOLV && IsCursorAtURLField(pOLV->GetEditView()); + } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |