Do not crash when reporting diffs about virtual member fns that have no symbol

* src/abg-comparison.cc (represent): If a virtual member function
	has no symbol do not crash.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-10-02 12:29:02 +02:00
parent b9d97f21c3
commit 5ede56f5f8

View File

@ -1532,8 +1532,14 @@ represent(diff_context& ctxt,
<< "/"
<< meth->get_type()->get_class_type()->get_virtual_mem_fns().size();
if (ctxt.show_linkage_names())
out << " {" << mem_fn->get_symbol()->get_id_string() << "}";
if (ctxt.show_linkage_names()
&& (mem_fn->get_symbol() ||! mem_fn->get_linkage_name().empty()))
out << " {";
if (mem_fn->get_symbol())
out << mem_fn->get_symbol()->get_id_string();
else if (!mem_fn->get_linkage_name().empty())
out << mem_fn->get_linkage_name();
out << "}";
out << "\n";
}