Fix a bug in o_attrib_search_name_single() were it might return NULL.
commitfd28531b8e88ced997b0269fd31cdb23abf3936d
authorPeter Clifton <pcjc2@cam.ac.uk>
Tue, 9 Oct 2007 19:08:23 +0000 (9 20:08 +0100)
committerPeter Clifton <pcjc2@cam.ac.uk>
Tue, 9 Oct 2007 19:08:23 +0000 (9 20:08 +0100)
tree61734f877bb830e9ec15b7062d97c363b9e2c131
parentf217428f8248d6e8491d943256d30d5e11d808d1
Fix a bug in o_attrib_search_name_single() were it might return NULL.

If o_attrib_search_name_single() doesn't find an attribute attached to
the passed OBJECT, it checks if the passed OBJECT is itsself an attribute.
In this case, it would return NULL (the result from the preceeding search).

The bug might not actually be triggered in normal usage, as most callers
don't pass a variable to recieve the OBJECT pointer.
libgeda/src/o_attrib.c