Kaydet (Commit) 2a2b3720 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

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 e8b49f09
("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/48246Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst c68d08a6
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment