sw/source/uibase/dochdl/gloshdl.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d341313d3107f0480523378a464252585b17403b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Aug 27 10:42:15 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Aug 27 12:48:41 2022 +0200

    cid#1500545 silence Explicit null dereferenced
    
    Change-Id: Ie8cb87ab80a148a79510591fcd089c0bc230612e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138926
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/dochdl/gloshdl.cxx 
b/sw/source/uibase/dochdl/gloshdl.cxx
index c276f59ac6ce..d7a48ed8cd16 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -675,8 +675,9 @@ bool SwGlossaryHdl::ImportGlossaries( const OUString& rName 
)
         SfxMedium aMed( rName, StreamMode::READ, nullptr, nullptr );
         SfxFilterMatcher aMatcher( "swriter" );
         aMed.UseInteractionHandler( true );
-        if (!aMatcher.GuessFilter(aMed, pFilter, SfxFilterFlags::NONE))
+        if (aMatcher.GuessFilter(aMed, pFilter, SfxFilterFlags::NONE) == 
ERRCODE_NONE)
         {
+            assert(pFilter && "success means pFilter was set");
             SwTextBlocks *pGlossary = nullptr;
             aMed.SetFilter( pFilter );
             Reader* pR = SwReaderWriter::GetReader( pFilter->GetUserData() );

Reply via email to