From dfc08e58d241f0ad416e33ba9886e894fb8e14bd Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 4 Jun 2008 09:07:36 +0000 Subject: [PATCH] Followup to r8178: don't segfault if VG_(clo_log_name) is NULL. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8181 --- coregrind/m_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.2