REBASE: Fix vector out of range access.

This commit is contained in:
Ben Vanik 2015-12-29 13:00:51 -08:00
parent 5517518d36
commit 194c13f977
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ XObject::XObject(KernelState* kernel_state, Type type)
allocated_guest_object_(false) {
handles_.reserve(10);
if (kernel_state) {
kernel_state->object_table()->AddHandle(this, &handles_[0]);
X_HANDLE handle;
kernel_state->object_table()->AddHandle(this, &handle);
handles_[0] = handle;
}
}