[Libreoffice-commits] core.git: Branch 'libreoffice-6-0-0' - vcl/source
Maxim Monastirsky
momonasmon at gmail.com
Wed Jan 24 15:40:34 UTC 2018
vcl/source/control/ctrl.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit af274d8b6e819dc089239553811a6bd19a48df49
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sat Jan 20 19:51:34 2018 +0200
tdf#115023 Check mpControlData for nullptr
Control::ImplClearLayoutData happens to be called post
dispose, but Control::dispose already destroyed
mpControlData. So put back the nullptr check that was
removed in e8b49f09074fe184374bee5062715357427ae044
("new loplugin: useuniqueptr: vcl").
(But IMHO it's odd that we even try to send lose focus
events to disposing windows. So maybe it would make sense
to replace the "! pOldFocusWindow->IsDisposed()" check
inside Window::ImplGrabFocus with "isDisposed()" which
comes from VclReferenceBase, and set much earlier?)
Change-Id: Iddaf7e05d6cb56c28a34884876770753fcf7179e
Reviewed-on: https://gerrit.libreoffice.org/48246
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
(cherry picked from commit 2a2b37202a735b34da914c03b2f6e1495f833b51)
Reviewed-on: https://gerrit.libreoffice.org/48275
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index b62c90563d46..5f3d23901b0a 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -328,7 +328,8 @@ void Control::SetLayoutDataParent( const Control* pParent ) const
void Control::ImplClearLayoutData() const
{
- mpControlData->mpLayoutData.reset();
+ if (mpControlData)
+ mpControlData->mpLayoutData.reset();
}
void Control::ImplDrawFrame( OutputDevice* pDev, tools::Rectangle& rRect )
More information about the Libreoffice-commits
mailing list