Fix obj_changed() to check object exists
Relatively harmless, because these kinds of objects don't go away.
This commit is contained in:
parent
b0fc3f43d4
commit
9728e68a42
1 changed files with 3 additions and 2 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* Known contributors to this file:
|
||||
* Steve McClure, 1998
|
||||
* Markus Armbruster, 2004-2011
|
||||
* Markus Armbruster, 2004-2012
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -50,7 +50,8 @@ obj_changed(struct empobj *obj, size_t sz)
|
|||
{
|
||||
union empobj_storage old, tobj;
|
||||
|
||||
get_empobj(obj->ef_type, obj->uid, &old);
|
||||
if (!get_empobj(obj->ef_type, obj->uid, &old))
|
||||
return 0;
|
||||
memcpy(&tobj, obj, sz);
|
||||
old.gen.timestamp = tobj.gen.timestamp = 0;
|
||||
old.gen.generation = tobj.gen.generation = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue