Kernel: Don't re-assign object's handle when duplicating one

This commit is contained in:
Yuri Kunde Schlesner 2014-12-31 09:20:48 -02:00
commit d751de7341

View file

@ -44,7 +44,8 @@ ResultVal<Handle> HandleTable::Create(Object* obj) {
objects[slot] = obj;
Handle handle = generation | (slot << 15);
obj->handle = handle;
if (obj->handle == INVALID_HANDLE)
obj->handle = handle;
return MakeResult<Handle>(handle);
}