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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 4 20:22:41 UTC 2020


 dbaccess/source/ui/browser/unodatbr.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f54edfb023d9007faa23b6b6ffa1f4d47ccd1fac
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 3 19:50:08 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 4 22:21:59 2020 +0200

    tdf#136442 a null return from GetEntryPosByName is allowed
    
    Change-Id: Id3e5255f1551eaa3e2f2bbd314634bdf921bffac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102022
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 115a378e8f26..fa9ec7994aee 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1158,7 +1158,10 @@ std::unique_ptr<weld::TreeIter> SbaTableQueryBrowser::getObjectEntry(const OUStr
                         assert(false);
                     }
                     xObject = m_pTreeView->GetEntryPosByName(sPath, xCommandType.get());
-                    rTreeView.copy_iterator(*xObject, *xCommandType);
+                    if (xObject)
+                        rTreeView.copy_iterator(*xObject, *xCommandType);
+                    else
+                        xCommandType.reset();
                     if ( nIndex >= 0 )
                     {
                         if (ensureEntryObject(*xObject))


More information about the Libreoffice-commits mailing list