dbaccess/source/ui/dlg/generalpage.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a51c1df3c2bad14de49a381945f4c55d4bccf8a8
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Aug 16 09:08:05 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Aug 16 12:19:05 2022 +0200

    cid#1500395 Dereference after null check
    
    Change-Id: I16b490849d2fa29295e6182e1bbe91836c5655bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138343
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index f2a11bfc9b24..4b3b293348dd 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -678,7 +678,7 @@ namespace dbaui
         // check for aFileDlg.GetCurrentFilter used to be here but current 
fpicker filter
         // can be set to anything, see tdf#125267 how this breaks if other 
value
         // than 'ODF Database' is selected. Let's therefore check only if 
wildcard matches
-        if ( !pFilter->GetWildcard().Matches(sPath) )
+        if (pFilter && !pFilter->GetWildcard().Matches(sPath))
         {
             OUString sMessage(DBA_RES(STR_ERR_USE_CONNECT_TO));
             std::unique_ptr<weld::MessageDialog> 
xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),

Reply via email to