Retain objects when restored into the object table.

This commit is contained in:
Dr. Chat 2015-12-05 19:35:25 -06:00 committed by Ben Vanik
parent c8a2298b9d
commit a4865bd24a
1 changed files with 1 additions and 0 deletions

View File

@ -401,6 +401,7 @@ X_STATUS ObjectTable::RestoreHandle(X_HANDLE handle, XObject* object) {
if (table_capacity_ >= slot) { if (table_capacity_ >= slot) {
auto& entry = table_[slot]; auto& entry = table_[slot];
entry.object = object; entry.object = object;
object->Retain();
} }
return X_STATUS_SUCCESS; return X_STATUS_SUCCESS;