Kaydet (Commit) 8f6af557 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#112215 null deref on missing optional ppd value

Change-Id: Iba45437332df963e1aa213c587071ab293f36390
Reviewed-on: https://gerrit.libreoffice.org/64164
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f2a39e1d
...@@ -848,13 +848,22 @@ PPDParser::PPDParser( const OUString& rFile ) : ...@@ -848,13 +848,22 @@ PPDParser::PPDParser( const OUString& rFile ) :
} }
// fill in direct values // fill in direct values
if( (pKey = getKey( OUString( "ColorDevice" ) )) ) if ((pKey = getKey(OUString("ColorDevice"))))
m_bColorDevice = pKey->getValue( 0 )->m_aValue.startsWithIgnoreAsciiCase( "true" ); {
if (const PPDValue* pValue = pKey->getValue(0))
m_bColorDevice = pValue->m_aValue.startsWithIgnoreAsciiCase("true");
}
if( (pKey = getKey( OUString( "LanguageLevel" ) )) ) if ((pKey = getKey(OUString("LanguageLevel"))))
m_nLanguageLevel = pKey->getValue( 0 )->m_aValue.toInt32(); {
if( (pKey = getKey( OUString( "TTRasterizer" ) )) ) if (const PPDValue* pValue = pKey->getValue(0))
m_bType42Capable = pKey->getValue( 0 )->m_aValue.equalsIgnoreAsciiCase( "Type42" ); m_nLanguageLevel = pValue->m_aValue.toInt32();
}
if ((pKey = getKey(OUString("TTRasterizer"))))
{
if (const PPDValue* pValue = pKey->getValue(0))
m_bType42Capable = pValue->m_aValue.equalsIgnoreAsciiCase( "Type42" );
}
} }
PPDParser::~PPDParser() PPDParser::~PPDParser()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment