Remove ~NotifyListener call to UnregisterNotifyListener (as it's impossible for this to occur)

This commit is contained in:
Dr. Chat 2015-12-05 18:42:44 -06:00 committed by Ben Vanik
parent 290d5d9594
commit c8a2298b9d
2 changed files with 2 additions and 4 deletions

View File

@ -610,7 +610,7 @@ bool KernelState::Save(ByteStream* stream) {
auto prev_offset = stream->offset(); auto prev_offset = stream->offset();
stream->Write((uint32_t)object->type()); stream->Write((uint32_t)object->type());
if (!object->is_host_object() && !object->Save(stream)) { if (object->is_host_object() || !object->Save(stream)) {
// Revert backwards and overwrite if a save failed. // Revert backwards and overwrite if a save failed.
stream->set_offset(prev_offset); stream->set_offset(prev_offset);
num_objects--; num_objects--;

View File

@ -17,9 +17,7 @@ namespace kernel {
NotifyListener::NotifyListener(KernelState* kernel_state) NotifyListener::NotifyListener(KernelState* kernel_state)
: XObject(kernel_state, kTypeNotifyListener) {} : XObject(kernel_state, kTypeNotifyListener) {}
NotifyListener::~NotifyListener() { NotifyListener::~NotifyListener() {}
kernel_state_->UnregisterNotifyListener(this);
}
void NotifyListener::Initialize(uint64_t mask) { void NotifyListener::Initialize(uint64_t mask) {
assert_false(wait_handle_); assert_false(wait_handle_);