summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-10 11:23:09 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-10 11:23:45 +0100
commit5c8a3bfc7e42009a7eaa6353cf2f66a14bfdab76 (patch)
tree986fae31729fed2534720a87c5c98e0455b20a2e /shell
parentf669e7907bef8585fd182986c708e2e4aed280aa (diff)
Don't call pclose(NULL)
Change-Id: I6540ec2b900e82745d5e661dfa920f85db6c0ff2
Diffstat (limited to 'shell')
-rw-r--r--shell/source/cmdmail/cmdmailsuppl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx
index 7730f050faff..7f4059478e71 100644
--- a/shell/source/cmdmail/cmdmailsuppl.cxx
+++ b/shell/source/cmdmail/cmdmailsuppl.cxx
@@ -301,7 +301,8 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
}
OString cmd = aBuffer.makeStringAndClear();
- if ( 0 != pclose(popen(cmd.getStr(), "w")) )
+ FILE * f = popen(cmd.getStr(), "w");
+ if (f == 0 || pclose(f) != 0)
{
throw ::com::sun::star::uno::Exception("No mail client configured",
static_cast < XSimpleMailClient * > (this) );