Skip to content

Commit 4c2de0d

Browse files
committed
Fix incorrect dhook callback removal
1 parent a6563c1 commit 4c2de0d

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

extensions/dhooks/src/capsule.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,6 @@ void Capsule::RemoveCallbackById(std::uint32_t id) {
154154
if (locals::plugin_hook_ids.end() != plugin_hooks_it) {
155155
plugin_hooks_it->second.erase(id);
156156
}
157-
if (cb.remove_callback != nullptr && cb.remove_callback->IsRunnable()) {
158-
cb.remove_callback->PushCell(id);
159-
cell_t ignore;
160-
cb.remove_callback->Execute(&ignore);
161-
}
162157
locals::hook_callbacks.erase(id);
163158

164159
if (rm_callback != nullptr && rm_callback->IsRunnable()) {
@@ -185,11 +180,6 @@ void Capsule::RemoveCallbackByPlugin(SourcePawn::IPluginContext* default_context
185180
cb.associated_capsule->_pre_hooks.erase(id);
186181
cb.associated_capsule->_post_hooks.erase(id);
187182
}
188-
if (cb.remove_callback != nullptr && cb.remove_callback->IsRunnable()) {
189-
cb.remove_callback->PushCell(id);
190-
cell_t ignore;
191-
cb.remove_callback->Execute(&ignore);
192-
}
193183
locals::hook_callbacks.erase(id);
194184

195185
if (rm_callback != nullptr && rm_callback->IsRunnable()) {

0 commit comments

Comments
 (0)