From 5c8a3bfc7e42009a7eaa6353cf2f66a14bfdab76 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 10 Feb 2014 11:23:09 +0100 Subject: Don't call pclose(NULL) Change-Id: I6540ec2b900e82745d5e661dfa920f85db6c0ff2 --- shell/source/cmdmail/cmdmailsuppl.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shell') 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) ); -- cgit