If the target process exits, and the debugger notifies dbgshim by
calling Unregister then dbgshim was calling back into the callback
to let it know that it couldn't enumerate modules.
With this fix, dbgshim no longer invokes the call back on errors
at the end if unregister has already been called.
}
}
- if (FAILED(hr))
+ if (FAILED(hr) && !m_canceled)
{
m_callback(NULL, m_parameter, hr);
}
}
}
- if (pe != NO_ERROR)
+ if (pe != NO_ERROR && !m_canceled)
{
SetLastError(pe);
m_callback(NULL, NULL, m_parameter);