X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmodules%2Fos.c;h=6770a3fdcc78a60da6e3f671944e7179ab3dc165;hb=de8a9544f9caf441808a9433077c3ae00e55b1da;hp=17f033b7f2ec6f5fec46c304314180b91bc9e01b;hpb=7718f129a12f4b3cf778f8c29aca26e7636ca035;p=vlc diff --git a/src/modules/os.c b/src/modules/os.c index 17f033b7f2..6770a3fdcc 100644 --- a/src/modules/os.c +++ b/src/modules/os.c @@ -183,11 +183,17 @@ int module_Load( vlc_object_t *p_this, const char *psz_file, wchar_t psz_wfile[MAX_PATH]; MultiByteToWideChar( CP_ACP, 0, psz_file, -1, psz_wfile, MAX_PATH ); + /* FIXME: this is not thread-safe -- Courmisch */ + UINT mode = SetErrorMode (SEM_FAILCRITICALERRORS); + SetErrorMode (mode|SEM_FAILCRITICALERRORS); + #ifdef UNDER_CE handle = LoadLibrary( psz_wfile ); #else handle = LoadLibraryW( psz_wfile ); #endif + SetErrorMode (mode); + if( handle == NULL ) { char *psz_err = GetWindowsError();