summaryrefslogtreecommitdiff
path: root/shell/source/cmdmail/cmdmailsuppl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'shell/source/cmdmail/cmdmailsuppl.cxx')
-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) );