Prevent crash when no URL is specified.

This commit is contained in:
Hans Leidekker 2005-03-21 11:22:55 +00:00 committed by Alexandre Julliard
parent 2a7fce1ce2
commit 77da3d2d39
1 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,12 @@ int main (int argc, char *argv[])
LONG r; LONG r;
wine_get_unix_file_name_t wine_get_unix_file_name_ptr; wine_get_unix_file_name_t wine_get_unix_file_name_ptr;
if (argc <= 1)
{
fprintf( stderr, "Usage: winebrowser URL\n", argv[0] );
return 1;
}
/* check if the argument is a local file */ /* check if the argument is a local file */
wine_get_unix_file_name_ptr = (wine_get_unix_file_name_t) wine_get_unix_file_name_ptr = (wine_get_unix_file_name_t)
GetProcAddress( GetModuleHandle( "KERNEL32"), "wine_get_unix_file_name"); GetProcAddress( GetModuleHandle( "KERNEL32"), "wine_get_unix_file_name");