Avoid duplicate object handle assignment on creation.

This commit is contained in:
Ben Vanik
2015-12-29 14:03:23 -08:00
parent 9c694f07b3
commit 3ca0bff246
2 changed files with 4 additions and 6 deletions

View File

@@ -42,9 +42,7 @@ XObject::XObject(KernelState* kernel_state, Type type)
// TODO: Assert kernel_state != nullptr in this constructor.
if (kernel_state) {
X_HANDLE handle;
kernel_state->object_table()->AddHandle(this, &handle);
handles_[0] = handle;
kernel_state->object_table()->AddHandle(this, nullptr);
}
}