diff options
Diffstat (limited to 'i18nutil/source/utility/paper.cxx')
-rw-r--r-- | i18nutil/source/utility/paper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx index 6223b6bc3be4..93f81ce58673 100644 --- a/i18nutil/source/utility/paper.cxx +++ b/i18nutil/source/utility/paper.cxx @@ -233,9 +233,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper() char aBuffer[ 1024 ]; aBuffer[0] = 0; char *pBuffer = fgets( aBuffer, sizeof(aBuffer), pPipe ); - pclose( pPipe ); + bool bOk = pclose(pPipe) == 0; - if (pBuffer && *pBuffer != 0) + if (bOk && pBuffer && *pBuffer != 0) { OString aPaper(pBuffer); aPaper = aPaper.trim(); |