summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-03-01 14:04:52 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2019-03-13 10:59:00 +0100
commita2e8e8f82449b3291c36537d92870f9c4a13ef9c (patch)
treebc4f61f877456260dd2b630addfb71507375992c
parent2129ccb0c56341de8283dd57843ee85164d0301e (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> (cherry picked from commit f8d98bcf37c790e4f02cbe19016b7f29f53e07ff) Reviewed-on: https://gerrit.libreoffice.org/69121 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--vcl/source/window/window.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index aac1dc136a71..8df50b57da1f 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1829,7 +1829,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 )