winebuild: Don't segfault when running without arguments
André Hentschel
nerv at dawncrow.de
Mon Sep 6 18:32:49 CDT 2010
Before:
$ winebuild
Segmentation fault
---
tools/winebuild/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index f6c04fd..ba8a629 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -142,13 +142,13 @@ static void set_dll_file_name( const char *name, DLLSPEC *spec )
/* set the dll name from the file name */
static void init_dll_name( DLLSPEC *spec )
{
- if (!spec->file_name)
+ if (!spec->file_name && output_file_name)
{
char *p;
spec->file_name = xstrdup( output_file_name );
if ((p = strrchr( spec->file_name, '.' ))) *p = 0;
}
- if (!spec->dll_name) /* set default name from file name */
+ if (!spec->dll_name && spec->dll_name) /* set default name from file name */
{
char *p;
spec->dll_name = xstrdup( spec->file_name );
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list