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>
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 1925a22..03b87a1 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -183,7 +183,9 @@
    // 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 );
    // redraw the entry
    GetModel()->InvalidateEntry( pEntry );
    SvTreeList* myModel = GetModel();
    if (myModel)
        myModel->InvalidateEntry( pEntry );
}

void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry )