diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-13 14:25:20 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-13 14:25:20 +0100 |
commit | 3c8d74eb3f853e3fa00afae284ae391caeb143fb (patch) | |
tree | b9f357b2368846aad4acb81c7a3e74b4c780b46b /sal | |
parent | fdo#73436 Let SdXImpressDocument handle css.drawing.* requests directly (diff) | |
download | core-3c8d74eb3f853e3fa00afae284ae391caeb143fb.tar.gz core-3c8d74eb3f853e3fa00afae284ae391caeb143fb.zip |
Handle osl_createThread failure
Change-Id: I58144461d3941359f8ea6c2bd547486b2c8ae81a
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/process.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index ee6346899840..24d0be6af678 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -685,7 +685,10 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName, hThread = osl_createThread(ChildStatusProc, &Data); - osl_waitCondition(Data.m_started, NULL); + if (hThread != 0) + { + osl_waitCondition(Data.m_started, NULL); + } osl_destroyCondition(Data.m_started); for (i = 0; Data.m_pszArgs[i] != NULL; i++) @@ -703,12 +706,14 @@ oslProcessError SAL_CALL osl_psz_executeProcess(sal_Char *pszImageName, if (Data.m_pProcImpl->m_pid != 0) { + assert(hThread != 0); + *pProcess = Data.m_pProcImpl; if (Options & osl_Process_WAIT) osl_joinProcess(*pProcess); - return osl_Process_E_None; + return osl_Process_E_None; } osl_destroyCondition(Data.m_pProcImpl->m_terminated); |