diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-02-14 21:17:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-15 10:12:11 +0100 |
commit | cbb0f58ef18f9a6bc135c4085f519c95e6fb663d (patch) | |
tree | c24834675978ccfd4eed6d8f6e2c34e0237aad26 /editeng | |
parent | f89860807baaa901629ce2a814b7a6c994318fe5 (diff) |
tdf#140414: fix Crash pressing Ctrl-K in input line in Calc
3 0x00007ff38b819d73 in vcl::Window::GetPointerPosPixel() (this=0x0) at vcl/source/window/mouse.cxx:552
4 0x00007ff3925fe7c1 in EditView::GetFieldUnderMousePointer(int&, int&) const (this=0x4c37160, nPara=@0x7ffd982b4f44: 0, nPos=@0x7ffd982b4f40: 57752960) at editeng/source/editeng/editview.cxx:1325
5 0x00007ff3925fe74a in EditView::GetFieldUnderMousePointer() const (this=0x4c37160) at editeng/source/editeng/editview.cxx:1315
6 0x00007ff3925fec4c in EditView::GetFieldAtCursor() const (this=0x4c37160) at editeng/source/editeng/editview.cxx:1384
7 0x00007ff377f6aa55 in ScEditShell::GetURLField() (this=0x37a31a0) at sc/source/ui/view/editsh.cxx:833
Change-Id: Ib369644f26eec4f37a34213f0b0113359a653098
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110859
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 35965e1e276a..8e7c62f224e6 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1273,7 +1273,10 @@ const SvxFieldItem* EditView::GetField( const Point& rPos, sal_Int32* pPara, sal const SvxFieldItem* EditView::GetFieldUnderMousePointer( sal_Int32& nPara, sal_Int32& nPos ) const { - Point aPos = pImpEditView->GetWindow()->GetPointerPosPixel(); + auto pWin = pImpEditView->GetWindow(); + if (!pWin) + return nullptr; + Point aPos = pWin->GetPointerPosPixel(); aPos = pImpEditView->GetWindow()->PixelToLogic( aPos ); return GetField( aPos, &nPara, &nPos ); } |