Avoid NULL dereference in ls_get_objectid
Avoid NULL dereference in ls_get_objectid

When ls_get_objectid is called with a non-existing object
(some clients failed to test if ls_next_object returns NULL).

cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond