diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-03-01 14:04:52 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-03-05 13:19:08 +0100 |
commit | f8d98bcf37c790e4f02cbe19016b7f29f53e07ff (patch) | |
tree | fe909a8498489698f586311444e7002a4c39920b | |
parent | 7e251025b97ed2a300270b1a565727441005c77e (diff) |
tdf#123745 vcl: fix some crash in Window::SetHelpHdl()
Qt5 has some QEvent::DeferredDelete thing, perhaps that's why it calls
this on a disposed Window?
0 vcl::Window::SetHelpHdl(Link<vcl::Window&, bool> const&) (this=0x60cf9e0, rLink=...) at vcl/source/window/window.cxx:1825
1 SalInstanceWindow::clear_child_help(vcl::Window*) (this=0x7fa40c0, pParent=0x60cf9e0) at vcl/source/app/salvtables.cxx:825
2 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at vcl/source/app/salvtables.cxx:962
3 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at vcl/source/app/salvtables.cxx:963
4 std::default_delete<weld::Window>::operator()(weld::Window*) const (this=0x60d0b90, __ptr=0x7fa4190) at /usr/include/c++/8/bits/unique_ptr.h:81
5 std::unique_ptr<weld::Window, std::default_delete<weld::Window> >::~unique_ptr() (this=0x60d0b90, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:274
6 SalFrame::~SalFrame() (this=0x60d0b40, __in_chrg=<optimized out>) at vcl/source/app/salvtables.cxx:73
7 Qt5Frame::~Qt5Frame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/qt5/Qt5Frame.cxx:167
8 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/unx/kde5/KDE5SalFrame.hxx:34
9 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=<optimized out>) at vcl/unx/kde5/KDE5SalFrame.hxx:34
10 QObject::event(QEvent*) (this=0x60d0b30, e=<optimized out>) at kernel/qobject.cpp:1242
Change-Id: I2ac8cb24924ea3178c2b3eed14350515d8506ec3
Reviewed-on: https://gerrit.libreoffice.org/68581
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r-- | vcl/source/window/window.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 2a3fa4199603..10d1a4385622 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1822,7 +1822,10 @@ void Window::LoseFocus() void Window::SetHelpHdl(const Link<vcl::Window&, bool>& rLink) { - mpWindowImpl->maHelpRequestHdl = rLink; + if (mpWindowImpl) // may be called after dispose + { + mpWindowImpl->maHelpRequestHdl = rLink; + } } void Window::RequestHelp( const HelpEvent& rHEvt ) |