Don't crash when de-serializing an empty function parm xml node

* src/abg-reader.cc (build_function_parameter): Do not crash if
	the xml node is NULL.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-05-14 11:18:05 +02:00
parent 2c60959d8f
commit 3e9cd9cd81

View File

@ -1319,7 +1319,7 @@ build_function_parameter(read_context& ctxt, const xmlNodePtr node)
{
shared_ptr<function_decl::parameter> nil;
if (!xmlStrEqual(node->name, BAD_CAST("parameter")))
if (!node || !xmlStrEqual(node->name, BAD_CAST("parameter")))
return nil;
bool is_variadic = false;