From: Julian Seward Date: Wed, 4 Jun 2008 09:07:36 +0000 (+0000) Subject: Followup to r8178: don't segfault if VG_(clo_log_name) is NULL. X-Git-Tag: svn/VALGRIND_3_4_0~521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfc08e58d241f0ad416e33ba9886e894fb8e14bd;p=thirdparty%2Fvalgrind.git Followup to r8178: don't segfault if VG_(clo_log_name) is NULL. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8181 --- diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 7717470965..e637f7a056 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -854,7 +854,8 @@ static void print_preamble(Bool logging_to_fd, const char* toolname) VG_(message)(Vg_UserMsg, "%d", VG_(getpid)()); VG_(message)(Vg_UserMsg, "%d", VG_(getppid)()); VG_(message)(Vg_UserMsg, "%t", toolname); - print_file_vars(VG_(clo_log_name)); + if (VG_(clo_log_name)) + print_file_vars(VG_(clo_log_name)); if (VG_(clo_xml_user_comment)) { /* Note: the user comment itself is XML and is therefore to be passed through verbatim (%s) rather than escaped