winebuild: Don't segfault when run without arguments.

This commit is contained in:
André Hentschel 2010-09-07 16:36:55 +02:00 committed by Alexandre Julliard
parent f46f926134
commit d0f434eb3a
1 changed files with 2 additions and 2 deletions

View File

@ -142,13 +142,13 @@ static void set_dll_file_name( const char *name, DLLSPEC *spec )
/* set the dll name from the file name */ /* set the dll name from the file name */
static void init_dll_name( DLLSPEC *spec ) static void init_dll_name( DLLSPEC *spec )
{ {
if (!spec->file_name) if (!spec->file_name && output_file_name)
{ {
char *p; char *p;
spec->file_name = xstrdup( output_file_name ); spec->file_name = xstrdup( output_file_name );
if ((p = strrchr( spec->file_name, '.' ))) *p = 0; if ((p = strrchr( spec->file_name, '.' ))) *p = 0;
} }
if (!spec->dll_name) /* set default name from file name */ if (!spec->dll_name && spec->file_name) /* set default name from file name */
{ {
char *p; char *p;
spec->dll_name = xstrdup( spec->file_name ); spec->dll_name = xstrdup( spec->file_name );