vcl/source/fontsubset/cff.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit bd63364abe775d1e71ad93fb69b577f019c3a257
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Nov 7 11:00:17 2022 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Nov 8 07:13:34 2022 +0100

    CffSubsetterContext::getString never returns null
    
    Change-Id: I57e59b7659a9da2b291e8d6876617990f9e3a530
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142404
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index bd63eafc21fe..6d1cac5040b5 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1677,12 +1677,10 @@ const char* CffSubsetterContext::getGlyphName( int 
nGlyphIndex)
     else {                  // glyph name from string table
         const char* pSidName = getString( nSID);
         // check validity of glyph name
-        if( pSidName) {
-            const char* p = pSidName;
-            while( (*p >= '0') && (*p <= 'z')) ++p;
-            if( (p >= pSidName+1) && (*p == '\0'))
-                pGlyphName = pSidName;
-        }
+        const char* p = pSidName;
+        while( (*p >= '0') && (*p <= 'z')) ++p;
+        if( (p >= pSidName+1) && (*p == '\0'))
+            pGlyphName = pSidName;
         // if needed invent a fallback name
         if( pGlyphName != pSidName)
              sprintf( aDefaultGlyphName, "bad%03d", nSID);

Reply via email to