summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-10-23 23:42:35 +0200
committerCaolán McNamara <caolanm@redhat.com>2017-10-25 17:34:27 +0200
commite13650902068ca28cbe2bb1856f1a4c372f409bd (patch)
treedbcdde47263b6e92c8eb7361968b23266c79959e
parent9a6966c913e5301101456a3df8b8cd96a8e5588c (diff)
tdf#113368: fix crash when closing dialog opened with Basic
See bt https://bugs.documentfoundation.org/attachment.cgi?id=137222 3 0x00007fffebe196b7 in vcl::Window::GrabFocus() (this=0x0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:3003 4 0x00007fffee473602 in FileControl::GetFocus() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/svtools/source/control/filectrl.cxx:177 5 0x00007fffebe1c99b in vcl::Window::CompatGetFocus() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:3694 6 0x00007fffebd62672 in vcl::Window::ImplGrabFocus(GetFocusFlags) (this=0x28760b0, nFlags=GetFocusFlags::NONE) at /tinderbox/buildslave/source/libo-master/vcl/source/window/mouse.cxx:377 7 0x00007fffebe196b7 in vcl::Window::GrabFocus() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:3003 8 0x00007fffebe0bfc5 in vcl::Window::dispose() (this=0x28778b0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:449 9 0x00007fffebe6536c in Control::dispose() (this=0x28778b0) at /tinderbox/buildslave/source/libo-master/vcl/source/control/ctrl.cxx:65 10 0x00007fffebe6a4b6 in Edit::dispose() (this=0x28778b0) at /tinderbox/buildslave/source/libo-master/vcl/source/control/edit.cxx:265 11 0x00007fffebfa5ac0 in VclReferenceBase::disposeOnce() (this=0x2877bc8) at /tinderbox/buildslave/source/libo-master/vcl/source/outdev/vclreferencebase.cxx:42 12 0x00007fffee41f948 in VclPtr<Edit>::disposeAndClear() (this=0x28762c0) at /tinderbox/buildslave/source/libo-master/include/vcl/vclptr.hxx:208 13 0x00007fffee472f0e in FileControl::dispose() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/svtools/source/control/filectrl.cxx:89 Change-Id: I97fd3679a8692893047c22ff3e452a5c3e3f25c3 Reviewed-on: https://gerrit.libreoffice.org/43731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit fe22bdc3b537afa8ebcb5cb057542b762c770722) Reviewed-on: https://gerrit.libreoffice.org/43732 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svtools/source/control/filectrl.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 7fc74b545618..37d58075362b 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -174,6 +174,8 @@ void FileControl::Resize()
void FileControl::GetFocus()
{
+ if (!maEdit || maEdit->IsDisposed())
+ return;
maEdit->GrabFocus();
}