// process).
int hook_index = server_hooks_.getIndex(name);
+ // New hooks can have been registered since the manager was constructed.
+ if (hook_index >= hook_vector_.size()) {
+ return (false);
+ }
+
/// Construct a CalloutEntry matching the current library and the callout
/// we want to remove.
CalloutEntry target(current_library_, callout);
// process).
int hook_index = server_hooks_.getIndex(name);
+ // New hooks can have been registered since the manager was constructed.
+ if (hook_index >= hook_vector_.size()) {
+ return (false);
+ }
+
/// Construct a CalloutEntry matching the current library (the callout
/// pointer is NULL as we are not checking that).
CalloutEntry target(current_library_, static_cast<CalloutPtr>(0));