Browse Source

Fixed Forum-32990: Check that interface ISymUnmanagedDispose is supported before using it.

pull/2/head
David Srbecký 15 years ago
parent
commit
27de13f90f
  1. 7
      src/AddIns/Debugger/Debugger.Core/Module.cs

7
src/AddIns/Debugger/Debugger.Core/Module.cs

@ -190,7 +190,12 @@ namespace Debugger @@ -190,7 +190,12 @@ namespace Debugger
public void UnloadSymbols()
{
if (symReader != null) {
((ISymUnmanagedDispose)symReader).Destroy();
// The interface is not always supported, I did not manage to reproduce it, but the
// last callbacks in the user's log were UnloadClass and UnloadModule so I guess
// it has something to do with dynamic modules.
if (symReader is ISymUnmanagedDispose) {
((ISymUnmanagedDispose)symReader).Destroy();
}
symReader = null;
}
}

Loading…
Cancel
Save