Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions mono/metadata/w32process-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,9 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar

static char *handler;
static gunichar2 *handler_utf16;
#ifndef HOST_DARWIN
gboolean finished = FALSE;
#endif

if (handler_utf16 == (gunichar2 *)-1) {
ret = FALSE;
Expand All @@ -2053,6 +2056,7 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar
if (handler == NULL){
handler_utf16 = (gunichar2 *) -1;
ret = FALSE;
finished = TRUE;
} else {
/* kfmclient needs exec argument */
char *old = handler;
Expand All @@ -2063,9 +2067,8 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar
}
}
MONO_EXIT_GC_SAFE;
if (ret == FALSE){
if (finished)
goto done;
}
#endif
handler_utf16 = g_utf8_to_utf16 (handler, -1, NULL, NULL, NULL);
g_free (handler);
Expand Down