X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bin%2Fwinvlc.c;h=90ed7ce4de1cbea559207622261811dcb451d16d;hb=69d7fdea2da6f773fd7993f78c2bea494eb2d819;hp=6e933856cfa2d55d775c2b1e04d07266af0c6158;hpb=7c912f1eda4ff437d3d6f2a44080512a57e314b4;p=vlc diff --git a/bin/winvlc.c b/bin/winvlc.c index 6e933856cf..90ed7ce4de 100644 --- a/bin/winvlc.c +++ b/bin/winvlc.c @@ -46,6 +46,7 @@ static void check_crashdump(void); LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo); # endif +#define HeapEnableTerminationOnCorruption (HEAP_INFORMATION_CLASS)1 #endif #ifndef UNDER_CE @@ -117,8 +118,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, #endif int nCmdShow ) { - int argc, ret; + int argc; #ifndef UNDER_CE + HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); wchar_t **wargv = CommandLineToArgvW (GetCommandLine (), &argc); if (wargv == NULL) return 1; @@ -162,12 +164,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, argc = parse_cmdline (psz_cmdline, &argv); #endif - libvlc_exception_t ex; - libvlc_exception_init (&ex); - /* Initialize libvlc */ libvlc_instance_t *vlc; - vlc = libvlc_new (argc, (const char **)argv, &ex); + vlc = libvlc_new (argc, (const char **)argv); if (vlc != NULL) { libvlc_add_intf (vlc, "globalhotkeys,none"); @@ -177,14 +176,11 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, libvlc_release (vlc); } - ret = libvlc_exception_raised (&ex); - libvlc_exception_clear (&ex); - for (int i = 0; i < argc; i++) free (argv[i]); (void)hInstance; (void)hPrevInstance; (void)lpCmdLine; (void)nCmdShow; - return ret; + return 0; } #if !defined( UNDER_CE ) && !defined( _WIN64 )