summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 0ec20554b178..7d286e03ed8c 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -680,7 +680,7 @@ PPDParser::PPDParser( const OUString& rFile ) :
while( ! aStream.IsEof() )
{
OString aCurLine = aStream.ReadLine();
- if( aCurLine[0] == '*' )
+ if (!aCurLine.isEmpty() && aCurLine[0] == '*')
{
if (aCurLine.matchIgnoreAsciiCase(OString("*include:")))
{
@@ -952,7 +952,7 @@ void PPDParser::parse( ::std::list< OString >& rLines )
{
OString aCurrentLine( *line );
++line;
- if( aCurrentLine[0] != '*' )
+ if (aCurrentLine.getLength() < 2 || aCurrentLine[0] != '*')
continue;
if( aCurrentLine[1] == '%' )
continue;