tdf#122020 - avoid nullptr deref.

Change-Id: Iaa63a90841523061490d207ba5403de26d5c0025
Reviewed-on: https://gerrit.libreoffice.org/65005
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
This commit is contained in:
Michael Meeks
2018-12-12 09:18:09 +00:00
committed by Xisco Faulí
parent 89c888b48e
commit 27995e638e

View File

@@ -183,7 +183,9 @@ IMPL_LINK(DBTreeListBox, OnResetEntry, void*, p, void)
// set the flag which allows if the entry can be expanded // set the flag which allows if the entry can be expanded
pEntry->SetFlags( (pEntry->GetFlags() & ~SvTLEntryFlags(SvTLEntryFlags::NO_NODEBMP | SvTLEntryFlags::HAD_CHILDREN)) | SvTLEntryFlags::CHILDREN_ON_DEMAND ); pEntry->SetFlags( (pEntry->GetFlags() & ~SvTLEntryFlags(SvTLEntryFlags::NO_NODEBMP | SvTLEntryFlags::HAD_CHILDREN)) | SvTLEntryFlags::CHILDREN_ON_DEMAND );
// redraw the entry // redraw the entry
GetModel()->InvalidateEntry( pEntry ); SvTreeList* myModel = GetModel();
if (myModel)
myModel->InvalidateEntry( pEntry );
} }
void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry ) void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry )