From a3de5d6e615aafb9528e22db5eeb6ddc12823256 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 30 Sep 2008 16:35:13 +0200 Subject: Don't crash when reporting an error if getting alternatives fails. --- tapsets.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index b1475997..a5a62c7a 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2241,7 +2241,8 @@ struct dwflpp { die = dwarf_formref_die (&attr_mem, &vardie); stringstream alternatives; - print_members(die,alternatives); + if (die != NULL) + print_members(die,alternatives); throw semantic_error("unable to find local '" + local + "'" + " near pc " + lex_cast_hex(pc) + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")"))); @@ -2317,7 +2318,8 @@ struct dwflpp { die = dwarf_formref_die (&attr_mem, vardie); stringstream alternatives; - print_members(die,alternatives); + if (die != NULL) + print_members(die,alternatives); throw semantic_error("unable to find return value" " near pc " + lex_cast_hex(pc) + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")"))); -- cgit