André Hentschel : winebuild: Don' t segfault when run without arguments.

Alexandre Julliard julliard at winehq.org
Tue Oct 5 14:41:48 CDT 2010


Module: wine
Branch: stable
Commit: 3613371a8857c9aeb467ce31becb0c1b595cbd2f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3613371a8857c9aeb467ce31becb0c1b595cbd2f

Author: André Hentschel <nerv at dawncrow.de>
Date:   Tue Sep  7 16:36:55 2010 +0200

winebuild: Don't segfault when run without arguments.
(cherry picked from commit d0f434eb3ac343d522ca4319abfd2df78367a8bd)

---

 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 0e662f8..4522938 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->file_name)  /* set default name from file name */
     {
         char *p;
         spec->dll_name = xstrdup( spec->file_name );




More information about the wine-cvs mailing list