[Libreoffice-commits] core.git: dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 12 17:23:54 UTC 2018


 dbaccess/source/ui/control/dbtreelistbox.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 27995e638e1582b443befa93bc5dfd5970a38ef2
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Dec 12 09:18:09 2018 +0000
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Wed Dec 12 18:23:28 2018 +0100

    tdf#122020 - avoid nullptr deref.
    
    Change-Id: Iaa63a90841523061490d207ba5403de26d5c0025
    Reviewed-on: https://gerrit.libreoffice.org/65005
    Tested-by: Jenkins
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 1925a2247c8a..03b87a1b2517 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -183,7 +183,9 @@ IMPL_LINK(DBTreeListBox, OnResetEntry, void*, p, void)
     // 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 )


More information about the Libreoffice-commits mailing list